mutex_lock man page on DigitalUNIX

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
DigitalUNIX logo
[printable version]

mutex_lock(3scl)					      mutex_lock(3scl)

       mutex_lock - Locks an unlocked mutex, blocking if necessary.

       SCL Threads Library (

       #include <synch.h>

       int mutex_lock(
		       mutex_t *mutexp );

       Address of the mutex to be locked.

       This routine locks the specified mutex. If the mutex is already locked,
       then this thread will wait (block) until it can lock the mutex.

       mutex_lock(3scl) is implemented by calling pthread_mutex_lock(3).

       mutex_lock(3scl) first checks to determine if the mutex is valid: if it
       is not, then the mutex is initialized for intra-process thread synchro‐
       nization (type USYNC_THREAD) by calling pthread_mutex_init(3).

       Note that because this  implementation  of  the	Solaris	 Compatibility
       Libraries  does	not  support  USYNC_PROCESS_ROBUST  mutexes,  that the
       return-statuses of EOWNERDEAD, ELOCKUNMAPPED, and  ENOTRECOVERABLE  are
       not possible from this routine.

       If  an  error  condition	 occurs, this routine returns an integer value
       indicating the type of error.

       Additional error return information may be written  to  the  SCL	 error
       log.  Refer to scl_error_log(4scl) for details.

       Possible return values are as follows:

       Successful    completion.     Error   from   pthread_mutex_init(3)   or
       pthread_mutex_lock(3).  A message is written to the SCL errorlog	 which
       outlines the error-code mapping. Or:

       An  internal  implementation  error occurred. Refer to the SCL errorlog
       for additional information.

       Note: EFAULT is not returned if mutexp is an illegal address. An	 ille‐
       gal address generates a SIGSEGV signal, which by default will abort the
       process and generate a core dump.


       Functions: mutex_destroy(3scl), mutex_init(3scl),  mutex_trylock(3scl),
       mutex_unlock(3scl),    pthread_mutex_init(3),	pthread_mutex_lock(3),
       scl_intro(3scl), scl_thread_intro(3scl)

       Files: scl_error_log(4scl)

       Manuals: Solaris Compatibility Libraries User's Guide


List of man pages available for DigitalUNIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net