* offset are used for the per-process notification bit maps.
*/
#define NOTIFY_MESSAGE 0x1000
+/* FIXME will be is_notify(a) ((a) == NOTIFY_MESSAGE) */
+#define is_notify(a) ((a) & NOTIFY_MESSAGE)
#define NOTIFY_FROM(p_nr) (NOTIFY_MESSAGE | ((p_nr) + NR_TASKS))
# define PROC_EVENT NOTIFY_FROM(PM_PROC_NR) /* process status change */
# define SYN_ALARM NOTIFY_FROM(CLOCK) /* synchronous alarm */
}
/* Check for special control messages first. */
- if ((call_nr & NOTIFY_MESSAGE)) {
- if (call_nr == PROC_EVENT && who_e == PM_PROC_NR)
+ if (is_notify(call_nr)) {
+ if (who_p == PM_PROC_NR)
{
/* PM tries to get FS to do something */
service_pm();
}
- else if (call_nr == SYN_ALARM && who_e == CLOCK)
+ else if (who_p == CLOCK)
{
/* Alarm timer expired. Used only for select().
* Check it.