sleepx Kernel Service
Purpose
Wait for an event.
Syntax
#include <sys/sleep.h>
Parameters
- chan
- Specifies the channel number. For the sleep service, this parameter identifies the channel to wait for (sleep on).
- pri
- Specifies the wakeup priority
- flags
- Signal control flags
Description
Wait for an event to occur. This procedure can only be called by a thread. Callers of this service must be prepared for a premature return and check that the reason for waiting has gone away.
The pri parameter will be the priority of the thread when it becomes
runnable again (if that priority is more favorable). The process will keep that priority until it is
dispatched. The range of the wakeup priority is 0 <= pri <= PRI_LOW
. If the
pri parameter is outside of that range, it is forced to the lower or upper
boundary.
Execution Environment
The sleepx kernel service can be called from the process environment only.
Return Values
- 0
- Indicates that the event occurred.
- 1
- Indicates that the event signalled out.