Changing the message union to anonymous.

This allows us to write things like this:
  message m;
  m.m_notify.interrupts = new_value;

or
  message *mp;
  mp->m_notify.interrupts = new_value;

The shorthands macro have been adapted for the new scheme, and will be
kept as long as we have generic messages being used.

Change-Id: Icfd02b5f126892b1d5d2cebe8c8fb02b180000f7
This commit is contained in:
2013-11-28 18:17:38 +01:00
parent 4a0199d66d
commit 175d3e7eae
28 changed files with 193 additions and 197 deletions

View File

@@ -28,14 +28,14 @@ int vm_cachecall(message *m, int call, void *addr, dev_t dev, off_t dev_offset,
assert(dev != NO_DEV);
m->m_u.m_vmmcp.dev_offset = dev_offset;
m->m_u.m_vmmcp.ino_offset = ino_offset;
m->m_u.m_vmmcp.ino = ino;
m->m_u.m_vmmcp.block = addr;
m->m_u.m_vmmcp.flags_ptr = flags;
m->m_u.m_vmmcp.dev = dev;
m->m_u.m_vmmcp.pages = blocksize / PAGE_SIZE;
m->m_u.m_vmmcp.flags = 0;
m->m_vmmcp.dev_offset = dev_offset;
m->m_vmmcp.ino_offset = ino_offset;
m->m_vmmcp.ino = ino;
m->m_vmmcp.block = addr;
m->m_vmmcp.flags_ptr = flags;
m->m_vmmcp.dev = dev;
m->m_vmmcp.pages = blocksize / PAGE_SIZE;
m->m_vmmcp.flags = 0;
return _taskcall(VM_PROC_NR, call, m);
}
@@ -49,7 +49,7 @@ void *vm_map_cacheblock(dev_t dev, off_t dev_offset,
ino, ino_offset, flags, blocksize) != OK)
return MAP_FAILED;
return m.m_u.m_vmmcp_reply.addr;
return m.m_vmmcp_reply.addr;
}
int vm_set_cacheblock(void *block, dev_t dev, off_t dev_offset,
@@ -70,7 +70,7 @@ vm_clear_cache(dev_t dev)
memset(&m, 0, sizeof(m));
m.m_u.m_vmmcp.dev = dev;
m.m_vmmcp.dev = dev;
return _taskcall(VM_PROC_NR, VM_CLEARCACHE, &m);
}