1.\" $NetBSD: pthread_barrierattr.3,v 1.4 2003/11/02 11:18:10 wiz 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.\" 3. Neither the name of The NetBSD Foundation nor the names of its 14.\" contributors may be used to endorse or promote products derived 15.\" from this software without specific prior written permission. 16.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 17.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 18.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 19.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 20.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26.\" POSSIBILITY OF SUCH DAMAGE. 27.\" 28.Dd January 30, 2003 29.Dt PTHREAD_BARRIERATTR 3 30.Os 31.Sh NAME 32.Nm pthread_barrierattr_init , 33.Nm pthread_barrierattr_destroy , 34.Nd barrier attribute operations 35.Sh LIBRARY 36.Lb libpthread 37.Sh SYNOPSIS 38.In pthread.h 39.Ft int 40.Fn pthread_barrierattr_init "pthread_barrierattr_t *attr" 41.Ft int 42.Fn pthread_barrierattr_destroy "pthread_barrierattr_t *attr" 43.Sh DESCRIPTION 44Barrier attributes are used to specify parameters to 45.Fn pthread_barrier_init . 46One attribute object can be used in multiple calls to 47.Fn pthread_barrier_init , 48with or without modifications between calls. 49.Pp 50The 51.Fn pthread_barrierattr_init 52function initializes 53.Fa attr 54with all the default barrier attributes. 55.Pp 56The 57.Fn pthread_barrierattr_destroy 58function destroys 59.Fa attr . 60.Sh RETURN VALUES 61If successful, these functions return 0. 62Otherwise, an error number is returned to indicate the error. 63.Sh ERRORS 64.Fn pthread_barrierattr_init 65shall fail if: 66.Bl -tag -width Er 67.It Bq Er ENOMEM 68Insufficent memory exists to initialize the barrier attributes object. 69.El 70.Pp 71.Fn pthread_barrierattr_init 72may fail if: 73.Bl -tag -width Er 74.It Bq Er EINVAL 75The value specified by 76.Fa attr 77is invalid. 78.El 79.Pp 80.Fn pthread_barrierattr_destroy 81may fail if: 82.Bl -tag -width Er 83.It Bq Er EINVAL 84The value specified by 85.Fa attr 86is invalid 87.El 88.Sh SEE ALSO 89.Xr pthread_barrier_init 3 90.Sh STANDARDS 91.Fn pthread_barrierattr_init 92and 93.Fn pthread_barrierattr_destroy 94conform to 95.St -p1003.1-2001 . 96