pthread_barrierattr_init man page on FreeBSD

Man page or keyword search:  
man Server   9747 pages
apropos Keyword Search (all sections)
Output format
FreeBSD logo
[printable version]

PTHREAD_BARRIERATTR(3)	 BSD Library Functions Manual	PTHREAD_BARRIERATTR(3)

NAME
     pthread_barrierattr_destroy, pthread_barrierattr_getpshared,
     pthread_barrierattr_init, pthread_barrierattr_setpshared — manipulate a
     barrier attribute object

LIBRARY
     POSIX Threads Library (libpthread, -lpthread)

SYNOPSIS
     #include <pthread.h>

     int
     pthread_barrierattr_destroy(pthread_barrierattr_t *attr);

     int
     pthread_barrierattr_getpshared(const pthread_barrierattr_t *attr,
	 int *pshared);

     int
     pthread_barrierattr_init(pthread_barrierattr_t *attr);

     int
     pthread_barrierattr_setpshared(pthread_barrierattr_t *attr, int pshared);

DESCRIPTION
     The pthread_barrierattr_init() function will initialize attr with default
     attributes.  The pthread_barrierattr_destroy() function will destroy attr
     and release any resources that may have been allocated on its behalf.

     The pthread_barrierattr_getpshared() function will put the value of the
     process-shared attribute from attr into the memory area pointed to by
     pshared.  The pthread_barrierattr_setpshared() function will set the
     process-shared attribute of attr to the value specified in pshared.  The
     argument pshared may have one of the following values:

     PTHREAD_PROCESS_PRIVATE  The barrier object it is attached to may only be
			      accessed by threads in the same process as the
			      one that created the object.

     PTHREAD_PROCESS_SHARED   The barrier object it is attached to may be
			      accessed by threads in processes other than the
			      one that created the object.

RETURN VALUES
     If successful, all these functions will return zero.  Otherwise, an error
     number will be returned to indicate the error.

     None of these functions will return EINTR.

ERRORS
     The pthread_barrierattr_destroy(), pthread_barrierattr_getpshared() and
     pthread_barrierattr_setpshared() functions may fail if:

     [EINVAL]		The value specified by attr is invalid.

     The pthread_barrierattr_init() function will fail if:

     [ENOMEM]		Insufficient memory to initialize the barrier
			attribute object attr.

     The pthread_barrierattr_setpshared() function will fail if:

     [EINVAL]		The value specified in pshared is not one of the
			allowed values.

SEE ALSO
     pthread_barrier_destroy(3), pthread_barrier_init(3),
     pthread_barrier_wait(3)

HISTORY
     The pthread_barrierattr_*() functions first appeared in library “libkse”
     in FreeBSD 5.2, and in library “libthr” in FreeBSD 5.3.

BUGS
     The implementation of barriers does not fully conform to IEEE Std 1003.2
     (“POSIX.2”) because the process-shared attribute is ignored in library
     “libthr”, and in library “libkse”; if any value other than
     PTHREAD_PROCESSES_PRIVATE is specified in a call to
     pthread_barrierattr_setpshared(), it will return EINVAL.

BSD			       February 19, 2004			   BSD
[top]

List of man pages available for FreeBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
...................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net