~ubuntu-branches/ubuntu/precise/manpages-posix/precise

1 by Francesco Paolo Lovergine
rules: linking manpages-posix not manpages.
1
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved 
2 by Francesco Paolo Lovergine
* Alligned to linux main manpages edition.
2
.TH "PTHREAD_RWLOCKATTR_DESTROY" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
1 by Francesco Paolo Lovergine
rules: linking manpages-posix not manpages.
3
.\" pthread_rwlockattr_destroy 
4
.SH NAME
5
pthread_rwlockattr_destroy, pthread_rwlockattr_init \- destroy and
6
initialize the read\-write lock attributes
7
object
8
.SH SYNOPSIS
9
.LP
10
\fB#include <pthread.h>
11
.br
12
.sp
13
int pthread_rwlockattr_destroy(pthread_rwlockattr_t\fP \fI*attr\fP\fB);
14
.br
15
int pthread_rwlockattr_init(pthread_rwlockattr_t\fP \fI*attr\fP\fB);
16
\fP
17
\fB
18
.br
19
\fP
20
.SH DESCRIPTION
21
.LP
22
The \fIpthread_rwlockattr_destroy\fP() function shall destroy a read-write
23
lock attributes object. A destroyed \fIattr\fP
24
attributes object can be reinitialized using \fIpthread_rwlockattr_init\fP();
25
the results of otherwise referencing the object
26
after it has been destroyed are undefined. An implementation may cause
27
\fIpthread_rwlockattr_destroy\fP() to set the object
28
referenced by \fIattr\fP to an invalid value.
29
.LP
30
The \fIpthread_rwlockattr_init\fP() function shall initialize a read-write
31
lock attributes object \fIattr\fP with the default
32
value for all of the attributes defined by the implementation.
33
.LP
34
Results are undefined if \fIpthread_rwlockattr_init\fP() is called
35
specifying an already initialized \fIattr\fP attributes
36
object.
37
.LP
38
After a read-write lock attributes object has been used to initialize
39
one or more read-write locks, any function affecting the
40
attributes object (including destruction) shall not affect any previously
41
initialized read-write locks.
42
.SH RETURN VALUE
43
.LP
44
If successful, the \fIpthread_rwlockattr_destroy\fP() and \fIpthread_rwlockattr_init\fP()
45
functions shall return zero;
46
otherwise, an error number shall be returned to indicate the error.
47
.SH ERRORS
48
.LP
49
The \fIpthread_rwlockattr_destroy\fP() function may fail if:
50
.TP 7
51
.B EINVAL
52
The value specified by \fIattr\fP is invalid.
53
.sp
54
.LP
55
The \fIpthread_rwlockattr_init\fP() function shall fail if:
56
.TP 7
57
.B ENOMEM
58
Insufficient memory exists to initialize the read-write lock attributes
59
object.
60
.sp
61
.LP
62
These functions shall not return an error code of [EINTR].
63
.LP
64
\fIThe following sections are informative.\fP
65
.SH EXAMPLES
66
.LP
67
None.
68
.SH APPLICATION USAGE
69
.LP
70
None.
71
.SH RATIONALE
72
.LP
73
None.
74
.SH FUTURE DIRECTIONS
75
.LP
76
None.
77
.SH SEE ALSO
78
.LP
79
\fIpthread_rwlock_destroy\fP() , \fIpthread_rwlockattr_getpshared\fP()
80
, \fIpthread_rwlockattr_setpshared\fP() , the Base Definitions volume
81
of
82
IEEE\ Std\ 1003.1-2001, \fI<pthread.h>\fP
83
.SH COPYRIGHT
84
Portions of this text are reprinted and reproduced in electronic form
85
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
86
-- Portable Operating System Interface (POSIX), The Open Group Base
87
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
88
Electrical and Electronics Engineers, Inc and The Open Group. In the
89
event of any discrepancy between this version and the original IEEE and
90
The Open Group Standard, the original IEEE and The Open Group Standard
91
is the referee document. The original Standard can be obtained online at
92
http://www.opengroup.org/unix/online.html .