drw_lock_try_write Kernel Service

Purpose

Immediately acquire a disabled read-write lock in write-exclusive mode if available.

Syntax

#include <sys/lock_def.h>

boolean_t drw_lock try_write ( lock_addr)
drw_lock_t   lock_addr ;    

Parameters

Item Description
lock_addr Specifies the address of the lock word to lock.

Description

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.

Execution Environment

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.

Return Values

The following only apply to drw_lock_try_write:

   
TRUE Indicates that the lock was acquired.
FALSE Indicates that the lock was not acquired.