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

@@ -589,7 +589,7 @@ rs_interrupt(message *m)
int line;
rs232_t *rs;
irq_set = m->NOTIFY_INTMASK;
irq_set = m->m_notify.interrupts;
for (line = 0, rs = rs_lines; line < NR_RS_LINES; line++, rs++) {
if (irq_set & (1 << rs->irq_hook_id)) {
rs232_handler(rs);

View File

@@ -534,7 +534,7 @@ void rs_interrupt(message *m)
int i;
rs232_t *rs;
irq_set= m->NOTIFY_INTMASK;
irq_set= m->m_notify.interrupts;
for (i= 0, rs = rs_lines; i<NR_RS_LINES; i++, rs++)
{
if (irq_set & (1 << rs->irq))

View File

@@ -186,18 +186,18 @@ int main(void)
switch (_ENDPOINT_P(tty_mess.m_source)) {
case CLOCK:
/* run watchdogs of expired timers */
expire_timers(tty_mess.NOTIFY_TIMESTAMP);
expire_timers(tty_mess.m_notify.timestamp);
break;
case HARDWARE:
/* hardware interrupt notification */
#if NR_RS_LINES > 0
/* serial I/O */
if (tty_mess.NOTIFY_INTMASK & rs_irq_set)
if (tty_mess.m_notify.interrupts & rs_irq_set)
rs_interrupt(&tty_mess);
#endif
/* run watchdogs of expired timers */
expire_timers(tty_mess.NOTIFY_TIMESTAMP);
expire_timers(tty_mess.m_notify.timestamp);
break;
default:
/* do nothing */