pthread_rwlock_unlock

Unlocks the specified reader-writer lock.

Library:LibC
Classification:POSIX
Service:Synchronization

Syntax

  #include <pthread.h>
   
  int  pthread_rwlock_unlock  (
     pthread_rwlock_t   *rwlp);
  

Parameters

rwlp

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

Return Values

Returns zero.

Remarks

The pthread_rwlock_unlock function releases the lock. If the function is releasing a reading lock and no one else holds a reading lock on this lock, the lock is placed in an unlocked state. If others still hold reading locks on this lock, the lock remains in a locked state.

If the function is releasing a writing lock, the lock is placed in an unlocked state.

See Also