resume suspended process execution
Synopsis (Not in current DDI version)
void wakeup(caddr_t event);
wakeup awakens all processes sleeping on the address specified
by event and makes them eligible for scheduling.
Address that was passed to the corresponding call to
which caused the process to be suspended.
The same event argument must be used for corresponding calls to
sleep and wakeup.
It is recommended
for code readability and for efficiency to have a one-to-one
correspondence between events and sleep addresses.
Whenever a driver returns from a call to sleep, it should test to ensure
that the event for which the driver slept actually occurred.
There is an interval between the time the process that called sleep is
awakened and the time it resumes execution where the state forcing the
sleep may have been reentered.
This can occur because all processes waiting for an event
are awakened at the same time.
The first process selected for execution by the scheduler
usually gains control of the event.
All other processes awakened should recognize that they cannot
continue and should reissue the sleep call.
Context and synchronization
Non-blockable, interrupt, user, or blockable
1, 2, 3, 4, 5, 5mp, 6, 6mp
Differences between versions
Starting with DDI version 7,
These new functions are much faster,
since they avoid the hash table insertion and lookup
that are needed to unblock the process
based on an arbitrary channel number.
Instead, they are passed a driver-owned sv-t object
which directly tracks sleeping LWPs.
``Synchronization variables'' in HDK Technical Reference.
Under some conditions, even greater performance
can be achieved by using
which only wakes up one LWP,
rather than waking up all the sleeping LWPs
and then having all but one
go back to sleep again.
must, however, be used with care.
``Synchronization variables'' in HDK Technical Reference
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005