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

NAME

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

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

EXAMPLES

61       None.
62

APPLICATION USAGE

64       None.
65

RATIONALE

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

FUTURE DIRECTIONS

73       None.
74

SEE ALSO

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