1PTHREAD_RWLOCKATTR_DESTROY(3PPO)SIX Programmer's ManPuTaHlREAD_RWLOCKATTR_DESTROY(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       pthread_rwlockattr_destroy, pthread_rwlockattr_init — destroy and  ini‐
14       tialize the read-write lock attributes object
15

SYNOPSIS

17       #include <pthread.h>
18
19       int pthread_rwlockattr_destroy(pthread_rwlockattr_t *attr);
20       int pthread_rwlockattr_init(pthread_rwlockattr_t *attr);
21

DESCRIPTION

23       The  pthread_rwlockattr_destroy()  function  shall destroy a read-write
24       lock attributes object. A  destroyed  attr  attributes  object  can  be
25       reinitialized using pthread_rwlockattr_init(); the results of otherwise
26       referencing the object after it has been destroyed  are  undefined.  An
27       implementation may cause pthread_rwlockattr_destroy() to set the object
28       referenced by attr to an invalid value.
29
30       The pthread_rwlockattr_init() function shall  initialize  a  read-write
31       lock  attributes  object  attr  with  the  default value for all of the
32       attributes defined by the implementation.
33
34       Results are undefined if pthread_rwlockattr_init() is called specifying
35       an already initialized attr attributes object.
36
37       After  a  read-write lock attributes object has been used to initialize
38       one or more read-write locks, any  function  affecting  the  attributes
39       object (including destruction) shall not affect any previously initial‐
40       ized read-write locks.
41
42       The behavior is undefined if the value specified by the  attr  argument
43       to  pthread_rwlockattr_destroy() does not refer to an initialized read-
44       write lock attributes object.
45

RETURN VALUE

47       If successful,  the  pthread_rwlockattr_destroy()  and  pthread_rwlock‐
48       attr_init()  functions  shall  return  zero; otherwise, an error number
49       shall be returned to indicate the error.
50

ERRORS

52       The pthread_rwlockattr_init() function shall fail if:
53
54       ENOMEM Insufficient memory exists to  initialize  the  read-write  lock
55              attributes object.
56
57       These functions shall not return an error code of [EINTR].
58
59       The following sections are informative.
60

EXAMPLES

62       None.
63

APPLICATION USAGE

65       None.
66

RATIONALE

68       If an implementation detects that the value specified by the attr argu‐
69       ment to pthread_rwlockattr_destroy() does not refer to  an  initialized
70       read-write  lock attributes object, it is recommended that the function
71       should fail and report an [EINVAL] error.
72

FUTURE DIRECTIONS

74       None.
75

SEE ALSO

77       pthread_rwlock_destroy(), pthread_rwlockattr_getpshared()
78
79       The Base Definitions volume of POSIX.1‐2008, <pthread.h>
80
82       Portions of this text are reprinted and reproduced in  electronic  form
83       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
84       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
85       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
86       cal and Electronics Engineers,  Inc  and  The  Open  Group.   (This  is
87       POSIX.1-2008  with  the  2013  Technical Corrigendum 1 applied.) In the
88       event of any discrepancy between this version and the original IEEE and
89       The  Open Group Standard, the original IEEE and The Open Group Standard
90       is the referee document. The original Standard can be  obtained  online
91       at http://www.unix.org/online.html .
92
93       Any  typographical  or  formatting  errors that appear in this page are
94       most likely to have been introduced during the conversion of the source
95       files  to  man page format. To report such errors, see https://www.ker
96       nel.org/doc/man-pages/reporting_bugs.html .
97
98
99
100IEEE/The Open Group                  2013       PTHREAD_RWLOCKATTR_DESTROY(3P)
Impressum