12.3.54 SP_mutex_unlock()

Synopsis

     #include <sicstus/sicstus.h>
     
     static SP_mutex volatile mutex = SP_MUTEX_INITIALIZER;
     
     int
     SP_mutex_unlock(SP_mutex *pmx);

Unlocks the mutex.

Return Value

Zero on error, non-zero on success.

Description

The number of unlocks must match the number of locks and only the thread that performed the lock can unlock the mutex.

Examples

See the example of SP_mutex_lock().

See Also

OS Threads.


Send feedback on this subject.