xref: /freebsd/share/man/man3/pthread_rwlockattr_init.3 (revision c2a44ea9e06b25ee4c17b55ba4accb97eee9a5bd)
1c0e36632SAlexander Langer.\" Copyright (c) 1998 Alex Nash
2c0e36632SAlexander Langer.\" All rights reserved.
3c0e36632SAlexander Langer.\"
4c0e36632SAlexander Langer.\" Redistribution and use in source and binary forms, with or without
5c0e36632SAlexander Langer.\" modification, are permitted provided that the following conditions
6c0e36632SAlexander Langer.\" are met:
7c0e36632SAlexander Langer.\" 1. Redistributions of source code must retain the above copyright
8c0e36632SAlexander Langer.\"    notice, this list of conditions and the following disclaimer.
9c0e36632SAlexander Langer.\" 2. Redistributions in binary form must reproduce the above copyright
10c0e36632SAlexander Langer.\"    notice, this list of conditions and the following disclaimer in the
11c0e36632SAlexander Langer.\"    documentation and/or other materials provided with the distribution.
12c0e36632SAlexander Langer.\"
13c0e36632SAlexander Langer.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14c0e36632SAlexander Langer.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15c0e36632SAlexander Langer.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16c0e36632SAlexander Langer.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17c0e36632SAlexander Langer.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18c0e36632SAlexander Langer.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19c0e36632SAlexander Langer.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20c0e36632SAlexander Langer.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21c0e36632SAlexander Langer.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22c0e36632SAlexander Langer.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23c0e36632SAlexander Langer.\" SUCH DAMAGE.
24c0e36632SAlexander Langer.\"
25c2a44ea9SAlexander Langer.\"	$Id: pthread_rwlockattr_init.3,v 1.1 1998/09/07 19:01:43 alex Exp $
26c0e36632SAlexander Langer.\"
27c0e36632SAlexander Langer.Dd August 4, 1998
28c0e36632SAlexander Langer.Dt PTHREAD_RWLOCKATTR_INIT 3
29c0e36632SAlexander Langer.Os
30c0e36632SAlexander Langer.Sh NAME
31c0e36632SAlexander Langer.Nm pthread_rwlockattr_init
32c0e36632SAlexander Langer.Nd initialize a read/write lock
33c0e36632SAlexander Langer.Sh SYNOPSIS
34c0e36632SAlexander Langer.Fd #include <pthread.h>
35c0e36632SAlexander Langer.Ft int
36c0e36632SAlexander Langer.Fn pthread_rwlockattr_init "pthread_rwlockattr_t *attr"
37c0e36632SAlexander Langer.Sh DESCRIPTION
38c0e36632SAlexander LangerThe
39c0e36632SAlexander Langer.Fn pthread_rwlockattr_init
40c0e36632SAlexander Langerfunction is used to initialize a read/write lock attributes object.
41c0e36632SAlexander Langer.Sh RETURN VALUES
42c0e36632SAlexander LangerIf successful, the
43c0e36632SAlexander Langer.Fn pthread_rwlockattr_init
44c0e36632SAlexander Langerfunction will return zero.  Otherwise an error number will be returned
45c0e36632SAlexander Langerto indicate the error.
46c0e36632SAlexander Langer.Sh SEE ALSO
47c0e36632SAlexander Langer.Xr pthread_rwlock_init 3 ,
48c0e36632SAlexander Langer.Xr pthread_rwlockattr_destroy 3 ,
49c2a44ea9SAlexander Langer.Xr pthread_rwlockattr_getpshared 3 ,
50c0e36632SAlexander Langer.Xr pthread_rwlockattr_setpshared 3
51c0e36632SAlexander Langer.Sh STANDARDS
52c0e36632SAlexander LangerThe
53c0e36632SAlexander Langer.Fn pthread_rwlockattr_init
54c0e36632SAlexander Langerfunction is expected to conform to
55c0e36632SAlexander Langer.St -susv2 .
56c0e36632SAlexander Langer.Sh ERRORS
57c0e36632SAlexander Langer.Fn pthread_rwlockattr_init
58c0e36632SAlexander Langerwill fail if:
59c0e36632SAlexander Langer.Bl -tag -width Er
60c0e36632SAlexander Langer.It Bq Er ENOMEM
61c0e36632SAlexander LangerInsufficient memory exists to initialize the attribute object.
62c0e36632SAlexander Langer.El
63c0e36632SAlexander Langer.Sh HISTORY
64c0e36632SAlexander LangerThe
65c0e36632SAlexander Langer.Fn pthread_rwlockattr_init
66c0e36632SAlexander Langerfunction first appeared in
67c0e36632SAlexander Langer.Fx 3.0 .
68