1PTHREAD_BARRIERATTR_DESTROY(PPO)SIX Programmer's ManPuTaHlREAD_BARRIERATTR_DESTROY(P)
2
3
4

NAME

6       pthread_barrierattr_destroy,  pthread_barrierattr_init  -  destroy  and
7       initialize the barrier attributes object (ADVANCED REALTIME THREADS)
8

SYNOPSIS

10       #include <pthread.h>
11
12       int pthread_barrierattr_destroy(pthread_barrierattr_t *attr);
13       int pthread_barrierattr_init(pthread_barrierattr_t *attr);
14
15

DESCRIPTION

17       The pthread_barrierattr_destroy()  function  shall  destroy  a  barrier
18       attributes object. A destroyed attr attributes object can be reinitial‐
19       ized using pthread_barrierattr_init(); the results of otherwise  refer‐
20       encing  the object after it has been destroyed are undefined. An imple‐
21       mentation may cause pthread_barrierattr_destroy()  to  set  the  object
22       referenced by attr to an invalid value.
23
24       The  pthread_barrierattr_init()  function  shall  initialize  a barrier
25       attributes object attr with the default value for all of the attributes
26       defined by the implementation.
27
28       Results  are undefined if pthread_barrierattr_init() is called specify‐
29       ing an already initialized attr attributes object.
30
31       After a barrier attributes object has been used to  initialize  one  or
32       more  barriers, any function affecting the attributes object (including
33       destruction) shall not affect any previously initialized barrier.
34

RETURN VALUE

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

ERRORS

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

EXAMPLES

57       None.
58

APPLICATION USAGE

60       The  pthread_barrierattr_destroy() and pthread_barrierattr_init() func‐
61       tions are part of the Barriers option and need not be provided  on  all
62       implementations.
63

RATIONALE

65       None.
66

FUTURE DIRECTIONS

68       None.
69

SEE ALSO

71       pthread_barrierattr_getpshared()  ,  pthread_barrierattr_setpshared() ,
72       the Base Definitions volume of 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_BARRIERATTR_DESTROY(P)
Impressum