for(p = dispatcher_procs; p != NULL; p = p->next) { if((id == DISPATCHER_BROADCAST || p->id == id) && p->signals[s] != 0 && p->signalhandler != NULL) { dispatcher_current = p->id; curproc = p; #if CC_FUNCTION_POINTER_ARGS p->signalhandler(s, data); #else  dispatcher_sighandler_s = s; dispatcher_sighandler_data = data; p->signalhandler(); #endif  } }
deliver(s, data, id);
dispatcher_signal(void){  struct dispatcher_proc *p;    static ek_signal_t s;  static ek_data_t data;  static ek_id_t id;    /* If there are any signals in the queue, take the first one and     walk through the list of processes to see if the signal should be     delivered to any of them. If so, we call the signal handler     function for the process. We only process one signal at a time     and call the idle handlers inbetween. */  if(nsignals > 0) {    /* There are signals that we should deliver. */    s = signals[fsignal].s;        data = signals[fsignal].data;    id = signals[fsignal].id;    /* Since we have seen the new signal, we move pointer upwards       and decrese number. */    fsignal = (fsignal + 1) % EK_CONF_NUMSIGNALS;    --nsignals;    for(p = dispatcher_procs; p != NULL; p = p->next) {            if((id == DISPATCHER_BROADCAST ||	  p->id == id) &&	 p->signals[s] != 0 &&	 p->signalhandler != NULL) {	dispatcher_current = p->id;	curproc = p;#if CC_FUNCTION_POINTER_ARGS	p->signalhandler(s, data);#else /* CC_FUNCTION_POINTER_ARGS */	dispatcher_sighandler_s = s;	dispatcher_sighandler_data = data;	p->signalhandler();#endif /* CC_FUNCTION_POINTER_ARGS */            }    }    }}