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:
@@ -392,12 +392,12 @@ void blockdriver_process_on_thread(struct blockdriver *bdp, message *m_ptr,
|
||||
switch (_ENDPOINT_P(m_ptr->m_source)) {
|
||||
case HARDWARE:
|
||||
if (bdp->bdr_intr)
|
||||
(*bdp->bdr_intr)(m_ptr->NOTIFY_INTMASK);
|
||||
(*bdp->bdr_intr)(m_ptr->m_notify.interrupts);
|
||||
break;
|
||||
|
||||
case CLOCK:
|
||||
if (bdp->bdr_alarm)
|
||||
(*bdp->bdr_alarm)(m_ptr->NOTIFY_TIMESTAMP);
|
||||
(*bdp->bdr_alarm)(m_ptr->m_notify.timestamp);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -58,15 +58,15 @@ int minix_vfs_mmap(endpoint_t who, off_t offset, size_t len,
|
||||
|
||||
memset(&m, 0, sizeof(message));
|
||||
|
||||
m.m_u.m_vm_vfs.who = who;
|
||||
m.m_u.m_vm_vfs.offset = offset;
|
||||
m.m_u.m_vm_vfs.dev = dev;
|
||||
m.m_u.m_vm_vfs.ino = ino;
|
||||
m.m_u.m_vm_vfs.vaddr = vaddr;
|
||||
m.m_u.m_vm_vfs.len = len;
|
||||
m.m_u.m_vm_vfs.fd = fd;
|
||||
m.m_u.m_vm_vfs.clearend = clearend;
|
||||
m.m_u.m_vm_vfs.flags = flags;
|
||||
m.m_vm_vfs.who = who;
|
||||
m.m_vm_vfs.offset = offset;
|
||||
m.m_vm_vfs.dev = dev;
|
||||
m.m_vm_vfs.ino = ino;
|
||||
m.m_vm_vfs.vaddr = vaddr;
|
||||
m.m_vm_vfs.len = len;
|
||||
m.m_vm_vfs.fd = fd;
|
||||
m.m_vm_vfs.clearend = clearend;
|
||||
m.m_vm_vfs.flags = flags;
|
||||
|
||||
return _syscall(VM_PROC_NR, VM_VFS_MMAP, &m);
|
||||
}
|
||||
|
||||
@@ -447,12 +447,12 @@ void chardriver_process(struct chardriver *cdp, message *m_ptr, int ipc_status)
|
||||
switch (_ENDPOINT_P(m_ptr->m_source)) {
|
||||
case HARDWARE:
|
||||
if (cdp->cdr_intr)
|
||||
cdp->cdr_intr(m_ptr->NOTIFY_INTMASK);
|
||||
cdp->cdr_intr(m_ptr->m_notify.interrupts);
|
||||
break;
|
||||
|
||||
case CLOCK:
|
||||
if (cdp->cdr_alarm)
|
||||
cdp->cdr_alarm(m_ptr->NOTIFY_TIMESTAMP);
|
||||
cdp->cdr_alarm(m_ptr->m_notify.timestamp);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -64,7 +64,7 @@ static void dispatcher_thread(void *unused) {
|
||||
case HARDWARE:
|
||||
for (i =0 ; i < 32 ; i++)
|
||||
{
|
||||
if(m.NOTIFY_INTMASK & (1 << i))
|
||||
if(m.m_notify.interrupts & (1 << i))
|
||||
{
|
||||
_ddekit_interrupt_trigger(i);
|
||||
}
|
||||
|
||||
@@ -349,8 +349,8 @@ omap_message_hook(message * m)
|
||||
switch (_ENDPOINT_P(m->m_source)) {
|
||||
case HARDWARE:
|
||||
/* Hardware interrupt return a "set" if pending interrupts */
|
||||
irq_set = m->NOTIFY_INTMASK;
|
||||
log_debug(&log, "HW message 0X%08llx\n", m->NOTIFY_INTMASK);
|
||||
irq_set = m->m_notify.interrupts;
|
||||
log_debug(&log, "HW message 0X%08llx\n", m->m_notify.interrupts);
|
||||
bank = &omap_gpio_banks[0];
|
||||
for (i = 0; omap_gpio_banks[i].name != NULL; i++) {
|
||||
bank = &omap_gpio_banks[i];
|
||||
|
||||
@@ -146,12 +146,12 @@ inputdriver_process(struct inputdriver *idp, message *m_ptr, int ipc_status)
|
||||
switch (_ENDPOINT_P(m_ptr->m_source)) {
|
||||
case HARDWARE:
|
||||
if (idp->idr_intr)
|
||||
idp->idr_intr(m_ptr->NOTIFY_INTMASK);
|
||||
idp->idr_intr(m_ptr->m_notify.interrupts);
|
||||
break;
|
||||
|
||||
case CLOCK:
|
||||
if (idp->idr_alarm)
|
||||
idp->idr_alarm(m_ptr->NOTIFY_TIMESTAMP);
|
||||
idp->idr_alarm(m_ptr->m_notify.timestamp);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -93,7 +93,7 @@ int do_sef_signal_request(message *m_ptr)
|
||||
|
||||
if(m_ptr->m_source == SYSTEM) {
|
||||
/* Handle kernel signals. */
|
||||
sigset = m_ptr->NOTIFY_SIGSET;
|
||||
sigset = m_ptr->m_notify.sigset;
|
||||
for (signo = SIGK_FIRST; signo <= SIGK_LAST; signo++) {
|
||||
int s = sigismember(&sigset, signo);
|
||||
assert(s >= 0);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user