1PTHREAD_RWLOCKATTR_DESTROY(PP)OSIX Programmer's ManuPaTlHREAD_RWLOCKATTR_DESTROY(P)
2
3
4

NAME

6       pthread_rwlockattr_destroy,  pthread_rwlockattr_init - destroy and ini‐
7       tialize the read-write lock attributes object
8

SYNOPSIS

10       #include <pthread.h>
11
12       int pthread_rwlockattr_destroy(pthread_rwlockattr_t *attr);
13       int pthread_rwlockattr_init(pthread_rwlockattr_t *attr);
14
15

DESCRIPTION

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

RETURN VALUE

37       If  successful,  the  pthread_rwlockattr_destroy()  and pthread_rwlock‐
38       attr_init() functions shall return zero;  otherwise,  an  error  number
39       shall be returned to indicate the error.
40

ERRORS

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

EXAMPLES

58       None.
59

APPLICATION USAGE

61       None.
62

RATIONALE

64       None.
65

FUTURE DIRECTIONS

67       None.
68

SEE ALSO

70       pthread_rwlock_destroy()    ,     pthread_rwlockattr_getpshared()     ,
71       pthread_rwlockattr_setpshared()   ,  the  Base  Definitions  volume  of
72       IEEE Std 1003.1-2001, <pthread.h>
73
75       Portions of this text are reprinted and reproduced in  electronic  form
76       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
77       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
78       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
79       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
80       event of any discrepancy between this version and the original IEEE and
81       The Open Group Standard, the original IEEE and The Open Group  Standard
82       is  the  referee document. The original Standard can be obtained online
83       at http://www.opengroup.org/unix/online.html .
84
85
86
87IEEE/The Open Group                  2003        PTHREAD_RWLOCKATTR_DESTROY(P)
Impressum