(pthread_mutex_timedlock): Document restrictions of mutex types.

This commit is contained in:
Ulrich Drepper 2000-06-26 16:39:37 +00:00
parent c49ebf7645
commit 1e9bbdd87f
1 changed files with 25 additions and 6 deletions

View File

@ -597,6 +597,25 @@ calling thread in the case of a ``fast'' mutex). Instead,
@code{EBUSY}.
@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 POSIX
@deftypefun int pthread_mutex_unlock (pthread_mutex_t *@var{mutex})