RW_UNLOCK(D3DK) —
NAME
RW_UNLOCK − release a read/write lock .IX \f4RW_UNLOCK\fP(D3DK)
SYNOPSIS
#include <sys/types.h>
#include <sys/ksynch.h>
void RW_UNLOCK(rwlock_t ∗lockp, pl_t pl);
ARGUMENTS
lockpPointer to the read/write lock to be released.
plThe interrupt priority level to be set after releasing the lock. See the description of the min_pl argument to RW_ALLOC(D3DK) for a list of the valid values for pl. If lock calls are not being nested or if the caller is unlocking in the reverse order that locks were acquired, the pl argument will typically be the value that was returned from the corresponding call to acquire the lock. The caller may need to specify a different value for pl if nested locks are released in some order other than the reverse order of acquisition, so as to ensure that the interrupt priority level is kept sufficiently high to block interrupt code that might attempt to acquire locks which are still held. Although portable drivers must always specify an appropriate pl argument, implementations which do not require that the interrupt priority level be raised during lock acquisition may choose to ignore this argument.
DESCRIPTION
RW_UNLOCK releases the read/write lock specified by lockp and then sets the interrupt priority level in accordance with the value specified by pl (if required by the implementation). If the lock is held in read mode by multiple contexts, RW_UNLOCK releases the lock in the calling context but does not cause the lock to be released in any other context.
RETURN VALUE
None.
LEVEL
Base or Interrupt.
NOTES
Does not sleep. Driver defined basic locks, read/write locks, and sleep locks may be held across calls to this function.
SEE ALSO
RW_ALLOC(D3DK), RW_DEALLOC(D3DK), RW_RDLOCK(D3DK), RW_TRYRDLOCK(D3DK), RW_TRYWRLOCK(D3DK), RW_WRLOCK(D3DK)
DDI/DKI