NXRwLockIsOwned

Checks to see if the calling thread owns the specified reader-writer lock.

Library:LibC
Classification:NKS
Service:Synchronization

Syntax

  #include <nks/synch.h>
   
  NXBool_t  NXRwLockIsOwned (
     NXRwLock_t     *lock, 
     unsigned long   mode);
  

Parameters

lock

(IN) Points to the reader-writer lock to check.

mode

(IN) Specifies whether to check the reader-writer lock as a reader or a writer:

Flag

Value

Description

NX_RWLOCK_RD

0

Read mode

NX_RWLOCK_WR

1

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.

If the application is built without the DEBUG compilation option, NXRwLockIsOwned always returns TRUE.

On NetWare, NXRwLockIsOwned always returns TRUE.

Remarks

NXRwLockIsOwned is expected to be used for asserting locking constraints.

See Also