Notifies kernel threads waiting on a shared event of the event's occurrence.
#include <sys/types.h>
#include <sys/errno.h>
#include <sys/sleep.h>
void e_wakeup ( event_word)
tid_t *event_word;
void e_wakeup_one ( event_word)
tid_t *event_word;
void e_wakeup_w_result ( event_word, result)
tid_t *event_word;
int result;
Item | Description |
---|---|
event_word | Specifies the shared event designator. The kernel uses the event_word parameter as the anchor to the list of threads waiting on this shared event. |
result | Specifies the value returned to the awakened kernel thread.
The following values can be used:
|
The e_wakeup and e_wakeup_w_result kernel services wake up all kernel threads sleeping on the event list anchored by the event_word parameter. The e_wakeup_one kernel service wakes up only the most favored thread sleeping on the event list anchored by the event_word parameter.
When threads are awakened, they return from a call to either the e_block_thread or e_sleep_thread kernel service. The return value depends on the kernel service called to wake up the threads (the wake-up kernel service):
If a signal is delivered to a thread being awakened by one of the wake-up kernel services, and if the thread specified the INTERRUPTIBLE flag, the signal delivery takes precedence. The thread is awakened with a return value of THREAD_INTERRUPTED, regardless of the called wake-up kernel service.
The e_wakeup and e_wakeup_w_result kernel services set the event_word parameter to EVENT_NULL.
The e_wakeup, e_wakeup_one, and e_wakeup_w_result kernel services have no return values.