1*86f9d4cdStedu.\" $OpenBSD: pthread_rwlockattr_init.3,v 1.9 2013/06/05 03:44:50 tedu Exp $ 2f8344ebdSd.\" Copyright (c) 1998 Alex Nash 3f8344ebdSd.\" All rights reserved. 4f8344ebdSd.\" 5f8344ebdSd.\" Redistribution and use in source and binary forms, with or without 6f8344ebdSd.\" modification, are permitted provided that the following conditions 7f8344ebdSd.\" are met: 8f8344ebdSd.\" 1. Redistributions of source code must retain the above copyright 9f8344ebdSd.\" notice, this list of conditions and the following disclaimer. 10f8344ebdSd.\" 2. Redistributions in binary form must reproduce the above copyright 11f8344ebdSd.\" notice, this list of conditions and the following disclaimer in the 12f8344ebdSd.\" documentation and/or other materials provided with the distribution. 13f8344ebdSd.\" 14f8344ebdSd.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15f8344ebdSd.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16f8344ebdSd.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17f8344ebdSd.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18f8344ebdSd.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19f8344ebdSd.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20f8344ebdSd.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21f8344ebdSd.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22f8344ebdSd.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23f8344ebdSd.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24f8344ebdSd.\" SUCH DAMAGE. 25f8344ebdSd.\" 2674493c91Sd.\" $FreeBSD: pthread_rwlockattr_init.3,v 1.3 1999/08/28 00:03:10 peter Exp $ 27f8344ebdSd.\" 28*86f9d4cdStedu.Dd $Mdocdate: June 5 2013 $ 29f8344ebdSd.Dt PTHREAD_RWLOCKATTR_INIT 3 30f8344ebdSd.Os 31f8344ebdSd.Sh NAME 32f8344ebdSd.Nm pthread_rwlockattr_init 33f8344ebdSd.Nd initialize a read/write lock 34f8344ebdSd.Sh SYNOPSIS 35*86f9d4cdStedu.In pthread.h 36f8344ebdSd.Ft int 37f8344ebdSd.Fn pthread_rwlockattr_init "pthread_rwlockattr_t *attr" 38f8344ebdSd.Sh DESCRIPTION 39f8344ebdSdThe 40f8344ebdSd.Fn pthread_rwlockattr_init 41f8344ebdSdfunction is used to initialize a read/write lock attributes object. 42f8344ebdSd.Sh RETURN VALUES 43f8344ebdSdIf successful, the 44f8344ebdSd.Fn pthread_rwlockattr_init 45ee997aeaSmpechfunction will return zero. 46ee997aeaSmpechOtherwise an error number will be returned to indicate the error. 47c062f733Sjmc.Sh ERRORS 48c062f733Sjmc.Fn pthread_rwlockattr_init 49c062f733Sjmcwill fail if: 50c062f733Sjmc.Bl -tag -width Er 51c062f733Sjmc.It Bq Er ENOMEM 52c062f733SjmcInsufficient memory exists to initialize the attribute object. 53c062f733Sjmc.El 54f8344ebdSd.Sh SEE ALSO 55f8344ebdSd.Xr pthread_rwlock_init 3 , 56f8344ebdSd.Xr pthread_rwlockattr_destroy 3 , 579d836f39Salex.Xr pthread_rwlockattr_getpshared 3 , 58f8344ebdSd.Xr pthread_rwlockattr_setpshared 3 59f8344ebdSd.Sh STANDARDS 60f8344ebdSdThe 61f8344ebdSd.Fn pthread_rwlockattr_init 62f8344ebdSdfunction is expected to conform to 63f8344ebdSd.St -susv2 . 64f8344ebdSd.Sh HISTORY 65f8344ebdSdThe 66f8344ebdSd.Fn pthread_rwlockattr_init 67f8344ebdSdfunction first appeared in 6874493c91Sd.Fx 3.0 6974493c91Sdand 70c536383fSalex.Ox 2.5 . 71