1pthread_barrierattr_destroSyt(a3nCd)ard C Library Funcpttihornesad_barrierattr_destroy(3C)
2
3
4
6 pthread_barrierattr_destroy, pthread_barrierattr_init - destroy and
7 initialize barrier attributes object
8
10 cc -mt [ flag... ] file... [ library... ]
11 #include <pthread.h>
12
13 int pthread_barrierattr_destroy(pthread_barrierattr_t *attr);
14
15
16 int pthread_barrierattr_init(pthread_barrierattr_t *attr);
17
18
20 The pthread_barrierattr_destroy() function destroys a barrier
21 attributes object. A destroyed attr attributes object can be reinitial‐
22 ized using pthread_barrierattr_init(). The results of otherwise refer‐
23 encing the object after it has been destroyed are undefined. An imple‐
24 mentation can cause pthread_barrierattr_destroy() to set the object
25 referenced by attr to an invalid value.
26
27
28 The pthread_barrierattr_init() function initializes a barrier
29 attributes object attr with the default value for all of the attributes
30 defined by the implementation.
31
32
33 Results are undefined if pthread_barrierattr_init() is called specify‐
34 ing an already initialized attr attributes object.
35
36
37 After a barrier attributes object has been used to initialize one or
38 more barriers, any function affecting the attributes object (including
39 destruction) does not affect any previously initialized barrier.
40
42 Upon successful completion, the pthread_barrierattr_destroy() and
43 pthread_barrierattr_init() functions returns 0. Otherwise, an error
44 number is returned to indicate the error.
45
47 The pthread_barrierattr_init() function will fail if:
48
49 ENOMEM Insufficient memory exists to initialize the barrier
50 attributes object.
51
52
53
54 The pthread_barrierattr_destroy() function may fail if:
55
56 EINVAL The value specified by attr is invalid.
57
58
60 See attributes(5) for descriptions of the following attributes:
61
62
63
64
65 ┌─────────────────────────────┬─────────────────────────────┐
66 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
67 ├─────────────────────────────┼─────────────────────────────┤
68 │Interface Stability │Standard │
69 ├─────────────────────────────┼─────────────────────────────┤
70 │MT-Level │MT-Safe │
71 └─────────────────────────────┴─────────────────────────────┘
72
74 pthread_barrierattr_getpshared(3C), attributes(5), standards(5)
75
76
77
78SunOS 5.11 30 Jan 2004 pthread_barrierattr_destroy(3C)