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
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

RETURN VALUE

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

ERRORS

48       The pthread_rwlockattr_destroy() function may fail if:
49
50       EINVAL The value specified by attr is invalid.
51
52
53       The pthread_rwlockattr_init() function shall fail if:
54
55       ENOMEM Insufficient memory exists to  initialize  the  read-write  lock
56              attributes object.
57
58
59       These functions shall not return an error code of [EINTR].
60
61       The following sections are informative.
62

EXAMPLES

64       None.
65

APPLICATION USAGE

67       None.
68

RATIONALE

70       None.
71

FUTURE DIRECTIONS

73       None.
74

SEE ALSO

76       pthread_rwlock_destroy(),              pthread_rwlockattr_getpshared(),
77       pthread_rwlockattr_setpshared(),  the  Base   Definitions   volume   of
78       IEEE Std 1003.1-2001, <pthread.h>
79
81       Portions  of  this text are reprinted and reproduced in electronic form
82       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
83       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
84       Specifications Issue 6, Copyright (C) 2001-2003  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
92
93IEEE/The Open Group                  2003       PTHREAD_RWLOCKATTR_DESTROY(3P)
Impressum