mirror of git://sourceware.org/git/glibc.git
(pthread_mutex_timedlock): Document restrictions of mutex types.
This commit is contained in:
parent
c49ebf7645
commit
1e9bbdd87f
|
|
@ -597,6 +597,25 @@ calling thread in the case of a ``fast'' mutex). Instead,
|
||||||
@code{EBUSY}.
|
@code{EBUSY}.
|
||||||
@end deftypefun
|
@end deftypefun
|
||||||
|
|
||||||
|
@comment pthread.h
|
||||||
|
@comment POSIX
|
||||||
|
@deftypefun int pthread_mutex_timedlock (pthread_mutex_t *@var{mutex}, const struct timespec *@var{abstime})
|
||||||
|
The @code{pthread_mutex_timedlock} is similar to the
|
||||||
|
@code{pthread_mutex_lock} function but instead of blocking for in
|
||||||
|
indefinite time if the mutex is locked by another thread, it returns
|
||||||
|
when the time specified in @var{abstime} is reached.
|
||||||
|
|
||||||
|
This function can only be used on standard (``timed'') and ``error
|
||||||
|
checking'' mutexes. It behaves just like @code{pthread_mutex_lock} for
|
||||||
|
all other types.
|
||||||
|
|
||||||
|
If the mutex is successfully locked, the function returns zero. If the
|
||||||
|
time specified in @var{abstime} is reached without the mutex being locked,
|
||||||
|
@code{ETIMEDOUT} is returned.
|
||||||
|
|
||||||
|
This function was introduced in the POSIX.1d revision of the POSIX standard.
|
||||||
|
@end deftypefun
|
||||||
|
|
||||||
@comment pthread.h
|
@comment pthread.h
|
||||||
@comment POSIX
|
@comment POSIX
|
||||||
@deftypefun int pthread_mutex_unlock (pthread_mutex_t *@var{mutex})
|
@deftypefun int pthread_mutex_unlock (pthread_mutex_t *@var{mutex})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue