drw_lock_islocked Kernel Service
Purpose
Determine whether a drw_lock is held in either read or write mode.
Syntax
#include <sys/lock_def.h>
boolean_t drw_lock_islocked ( lock_addr)
)drw_lock_t lock_addr ;
)drw_lock_t lock_addr ;
Parameters
Item | Description |
---|---|
lock_addr | Specifies the address of the lock word. |
Description
The drw_lock_islocked kernel services returns FALSE if the specified lock is not held in read or write mode. It returns TRUE if the lock is locked at the time of the call.
Execution Environment
The drw_lock_islocked kernel service may be called from either the process environment or the interrupt environment. However, if called from the process environment, interrupts must be disabled to some interrupt priority other than INTBASE.
Return Values
The following only apply to drw_lock_read_to_write:
Return value | Description |
---|---|
TRUE | Indicates that the lock is not currently held. |
FALSE | Indicates that the lock is held. |