mutex_unlock

Unlocks the specified mutex.

Library:LibC
Classification:UNIX International
Service:Synchronization

Syntax

  #include <synch.h>
   
  int   mutex_unlock   (
     mutex_t   *mp );
  

Parameters

mp

(IN) Points to the mutex to unlock.

Return Values

Returns 0; no error conditions have been defined.

Remarks

No assumptions should be made about the order in which threads waiting for a mutex actually acquire the mutex. The mutex is not guaranteed to be FIFO.

The thread attempting to release the mutex must own the mutex. If a thread attempts to release a mutex it does not own, a warning is asserted.

See Also