X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/5b2abdfbf4211b6592cdd02b9507555a0ecbb04b..b5d655f7532a546b54809da387f7467d128a756b:/pthreads/pthread_rwlock_wrlock.3 diff --git a/pthreads/pthread_rwlock_wrlock.3 b/pthreads/pthread_rwlock_wrlock.3 index f30df5a..5906e4b 100644 --- a/pthreads/pthread_rwlock_wrlock.3 +++ b/pthreads/pthread_rwlock_wrlock.3 @@ -28,20 +28,24 @@ .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 @@ -56,8 +60,8 @@ If successful, the .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 , @@ -89,7 +93,7 @@ The calling thread already owns the read/write lock (for reading 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