SLEEP_LOCK(D3)SLEEP_LOCK(D3)NAMESLEEP_LOCK - acquire a sleep lock
SYNOPSIS
#include <sys/ksynch.h>
#include <sys/ddi.h>
void SLEEP_LOCK(sleep_t *lockp, int priority);
Arguments
lockp Pointer to the sleep lock to be acquired.
priority Reserved for future use (must be equal to -1).
DESCRIPTIONSLEEP_LOCK acquires the sleep lock specified by lockp. If the lock is
not immediately available, the caller is put to sleep (the caller's
execution is suspended and other processes may be scheduled) until the
lock becomes available to the caller, at which point the caller wakes up
and returns with the lock held.
The caller will not be interrupted by signals while sleeping inside
SLEEP_LOCK.
Return Values
None
Level
Base only.
Synchronization Constraints
Can sleep.
Driver-defined basic locks and read/write locks may not be held across
calls to this function.
Driver-defined sleep locks may be held across calls to this function
subject to the recursion restrictions described below.
Warnings
Sleep locks are not recursive. A call to SLEEP_LOCK attempting to
acquire a lock that is currently held by the calling context will result
in deadlock.
REFERENCESpsema(D3X), SLEEP_ALLOC(D3), SLEEP_INIT(D3), SLEEP_DEALLOC(D3),
SLEEP_DESTROY(D3), SLEEP_LOCK_SIG(D3), SLEEP_LOCKAVAIL(D3),
SLEEP_TRYLOCK(D3), SLEEP_UNLOCK(D3)
Page 1