Home | History | Annotate | Download | only in pthread_mutex_unlock
      1 <assertions>
      2   <assertion id="1" tag="ref:XSH6:33935:33935">
      3   The function
      4      int pthread_mutex_unlock(pthread_mutex_t *mutex);
      5 
      6   releases the mutex object 'mutex'.
      7   </assertion>
      8 
      9   <assertion id="2" tag="ref:XSH6:33936:33939">
     10   If there are threads blocked on the mutex object referenced by 'mutex' when
     11   pthread_mutex_unlock() is called, resulting in the mutex becoming available,
     12   the scheduling policy shall determine which thread shall acquire the mutex.
     13   </assertion>
     14 
     15   <assertion id="3" tag="ref:XSH6:33945:33945">
     16   Upon success, it returns 0.
     17   </assertion>
     18 
     19   <assertion id="4" tag="ref:XSH6:33950:33965">
     20   Upon failure, it may return:
     21   -[EINVAL] 'mutex' does not refer to an initialized mutex object
     22   -[EPERM]  The current thread does not own 'mutex'
     23 
     24   It shall not return [EINTR].
     25   </assertion>
     26   <assertion id="5" tag="ref:XSH6:33919:33929">
     27   If the mutex type is PTHREAD_MUTEX_RECURSIVE:
     28      1. If a thread attempts to unlock a mutex that it does not own
     29      2. or an unlocked mutex,
     30   an error is returned.
     31   </assertion>
     32 </assertions>
     33