Immediately acquire a disabled read-write lock in write-exclusive mode if available.
#include <sys/lock_def.h>
boolean_t drw_lock try_write ( lock_addr)
drw_lock_t lock_addr ;
Item | Description |
---|---|
lock_addr | Specifies the address of the lock word to lock. |
The drw_lock_try_write kernel service acquires an available drw_lock in write mode and returns TRUE. It returns FALSE if the lock is not available.
The drw_lock_try_write 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.
The following only apply to drw_lock_try_write:
TRUE | Indicates that the lock was acquired. |
FALSE | Indicates that the lock was not acquired. |