Do not run mandoc for lintmanpages if MANPAGES is empty.
[netbsd-mini2440.git] / lib / libpthread / pthread_barrierattr.3
blob230bc516c3cc81cbcc1e3ba172f39c1af4eac3d1
1 .\" $NetBSD: pthread_barrierattr.3,v 1.5 2005/06/17 18:07:06 peter Exp $
2 .\"
3 .\" Copyright (c) 2002 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
14 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
15 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
17 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23 .\" POSSIBILITY OF SUCH DAMAGE.
24 .\"
25 .Dd January 30, 2003
26 .Dt PTHREAD_BARRIERATTR 3
27 .Os
28 .Sh NAME
29 .Nm pthread_barrierattr_init ,
30 .Nm pthread_barrierattr_destroy ,
31 .Nd barrier attribute operations
32 .Sh LIBRARY
33 .Lb libpthread
34 .Sh SYNOPSIS
35 .In pthread.h
36 .Ft int
37 .Fn pthread_barrierattr_init "pthread_barrierattr_t *attr"
38 .Ft int
39 .Fn pthread_barrierattr_destroy "pthread_barrierattr_t *attr"
40 .Sh DESCRIPTION
41 Barrier attributes are used to specify parameters to
42 .Fn pthread_barrier_init .
43 One attribute object can be used in multiple calls to
44 .Fn pthread_barrier_init ,
45 with or without modifications between calls.
46 .Pp
47 The
48 .Fn pthread_barrierattr_init
49 function initializes
50 .Fa attr
51 with all the default barrier attributes.
52 .Pp
53 The
54 .Fn pthread_barrierattr_destroy
55 function destroys
56 .Fa attr .
57 .Sh RETURN VALUES
58 If successful, these functions return 0.
59 Otherwise, an error number is returned to indicate the error.
60 .Sh ERRORS
61 .Fn pthread_barrierattr_init
62 shall fail if:
63 .Bl -tag -width Er
64 .It Bq Er ENOMEM
65 Insufficient memory exists to initialize the barrier attributes object.
66 .El
67 .Pp
68 .Fn pthread_barrierattr_init
69 may fail if:
70 .Bl -tag -width Er
71 .It Bq Er EINVAL
72 The value specified by
73 .Fa attr
74 is invalid.
75 .El
76 .Pp
77 .Fn pthread_barrierattr_destroy
78 may fail if:
79 .Bl -tag -width Er
80 .It Bq Er EINVAL
81 The value specified by
82 .Fa attr
83 is invalid
84 .El
85 .Sh SEE ALSO
86 .Xr pthread_barrier_init 3
87 .Sh STANDARDS
88 .Fn pthread_barrierattr_init
89 and
90 .Fn pthread_barrierattr_destroy
91 conform to
92 .St -p1003.1-2001 .