.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/lib/libc_r/man/pthread_cond_timedwait.3,v 1.8.2.6 2001/08/17 15:42:51 ru Exp $
+.\" $FreeBSD$
.\"
-.Dd July 28, 1998
+.Dd May 9, 2010
.Dt PTHREAD_COND_TIMEDWAIT 3
.Os
.Sh NAME
.Nm pthread_cond_timedwait
.Nd "wait on a condition variable for a specific amount of time"
.Sh SYNOPSIS
-.Fd #include <pthread.h>
+.In pthread.h
.Ft int
-.Fo pthread_cond_timedwait
-.Fa "pthread_cond_t *restrict cond"
-.Fa "pthread_mutex_t *restrict mutex"
-.Fa "const struct timespec *restrict abstime"
-.Fc
+.Fn pthread_cond_timedwait "pthread_cond_t *cond" "pthread_mutex_t *mutex" "const struct timespec *abstime"
.Sh DESCRIPTION
The
.Fn pthread_cond_timedwait
function atomically blocks the current thread waiting on the condition
variable specified by
-.Fa cond
-and unblocks the mutex specified by
+.Fa cond ,
+and releases the mutex specified by
.Fa mutex .
The waiting thread unblocks only after another thread calls
.Xr pthread_cond_signal 3 ,
If successful, the
.Fn pthread_cond_timedwait
function will return zero.
-Otherwise, an error number will be returned to
+Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
+The
.Fn pthread_cond_timedwait
-will fail if:
+function will fail if:
.Bl -tag -width Er
.It Bq Er EINVAL
The value specified by
.Xr pthread_cond_wait 3 ,
.Xr gettimeofday 2
.Sh STANDARDS
+The
.Fn pthread_cond_timedwait
-conforms to
+function conforms to
.St -p1003.1-96 .