Manual Pages for UNIX Darwin command on man pthread_mutex_lock
MyWebUniversity

Manual Pages for UNIX Darwin command on man pthread_mutex_lock

PTHREADMUTEXLOCK(3) BSD Library Functions Manual PTHREADMUTEXLOCK(3)

NAME

pptthhrreeaaddmmuutteexxlloocckk - lock a mutex

SYNOPSIS

##iinncclluuddee <>

int pptthhrreeaaddmmuutteexxlloocckk(pthreadmutext *mutex);

DESCRIPTION

The pptthhrreeaaddmmuutteexxlloocckk() function locks mutex. If the mutex is already locked, the calling thread will block until the mutex becomes available.

RETURN VALUES

If successful, pptthhrreeaaddmmuutteexxlloocckk() will return zero, otherwise an error number will be returned to indicate the error. EERRRROORRSS pptthhrreeaaddmmuutteexxlloocckk() will fail if: [EINVAL] The value specified by mutex is invalid. [EDEADLK] A deadlock would occur if the thread blocked waiting for mutex.

SEE ALSO

pthreadmutexdestroy(3), pthreadmutexinit(3), pthreadmutextrylock(3), pthreadmutexunlock(3) STANDARDS

pptthhrreeaaddmmuutteexxlloocckk() conforms to ISO/IEC 9945-1:1996 (``POSIX.1'').

BSD July 30, 1998 BSD




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™