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

@@ -101,14 +101,15 @@ static void set_idle_name(char * name, int n)
#define BuildNotifyMessage(m_ptr, src, dst_ptr) \
memset((m_ptr), 0, sizeof(*(m_ptr))); \
(m_ptr)->m_type = NOTIFY_MESSAGE; \
(m_ptr)->NOTIFY_TIMESTAMP = get_monotonic(); \
(m_ptr)->m_notify.timestamp = get_monotonic(); \
switch (src) { \
case HARDWARE: \
(m_ptr)->NOTIFY_INTMASK = priv(dst_ptr)->s_int_pending; \
(m_ptr)->m_notify.interrupts = \
priv(dst_ptr)->s_int_pending; \
priv(dst_ptr)->s_int_pending = 0; \
break; \
case SYSTEM: \
memcpy(&(m_ptr)->NOTIFY_SIGSET, \
memcpy(&(m_ptr)->m_notify.sigset, \
&priv(dst_ptr)->s_sig_pending, \
sizeof(sigset_t)); \
sigemptyset(&priv(dst_ptr)->s_sig_pending); \