.Dt PTHREAD_RWLOCK_WRLOCK 3
.Os
.Sh NAME
-.Nm pthread_rwlock_wrlock ,
-.Nm pthread_rwlock_trywrlock
+.Nm pthread_rwlock_trywrlock ,
+.Nm pthread_rwlock_wrlock
.Nd acquire a read/write lock for writing
.Sh SYNOPSIS
.In pthread.h
.Ft int
-.Fn pthread_rwlock_wrlock "pthread_rwlock_t *lock"
+.Fo pthread_rwlock_trywrlock
+.Fa "pthread_rwlock_t *rwlock"
+.Fc
.Ft int
-.Fn pthread_rwlock_trywrlock "pthread_rwlock_t *lock"
+.Fo pthread_rwlock_wrlock
+.Fa "pthread_rwlock_t *rwlock"
+.Fc
.Sh DESCRIPTION
The
.Fn pthread_rwlock_wrlock
function blocks until a write lock can be acquired against
-.Fa lock .
+.Fa rwlock .
The
.Fn pthread_rwlock_trywrlock
function performs the same action, but does not block if the lock
.Fn pthread_rwlock_wrlock
and
.Fn pthread_rwlock_trywrlock
-functions will return zero. Otherwise an error number will be returned
-to indicate the error.
+functions will return zero.
+Otherwise, an error number will be returned to indicate the error.
.Sh SEE ALSO
.Xr pthread_rwlock_trywrlock 3 ,
.Xr pthread_rwlock_unlock 3 ,
or writing).
.It Bq Er EINVAL
The value specified by
-.Fa lock
+.Fa rwlock
is invalid.
.It Bq Er ENOMEM
Insufficient memory exists to initialize the lock (applies to