NXTryWrLock

Makes a single attempt to acquire the specified reader-writer lock in the write mode.

Library:LibC
Classification:NKS
Service:Synchronization

Syntax

  #include <nks/synch.h>
   
  NXBool_t  NXTryWrLock (
     NXRwLock_t  *lock);
  

Parameters

lock

(IN) Points to the reader-writer lock to acquire in the write mode.

Return Values

TRUE

The calling thread owns the specified lock in the specified mode.

FALSE

The calling thread does not own the specified lock in the specified mode.

Remarks

Because this is a conditional acquisition, the hierarchy constraint with respect to locks is relaxed for this acquisition. If the lock being acquired is not available, NXTryWrLock returns FALSE.

See Also