NXTryRdLock

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

Library:LibC
Classification:NKS
Service:Synchronization

Syntax

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

Parameters

lock

(IN) Points to the reader-writer lock to acquire in the read 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, NXTryRdLock returns FALSE.

See Also