GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
PTHREAD_BARRIERATTR(3) FreeBSD Library Functions Manual PTHREAD_BARRIERATTR(3)

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

POSIX Threads Library (libpthread, -lpthread)

#include <pthread.h>

int
pthread_barrierattr_destroy(pthread_barrierattr_t *attr);

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

int
pthread_barrierattr_init(pthread_barrierattr_t *attr);

int
pthread_barrierattr_setpshared(pthread_barrierattr_t *attr, int pshared);

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:

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

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.

The pthread_barrierattr_destroy(), pthread_barrierattr_getpshared() and pthread_barrierattr_setpshared() functions may fail if:
[]
The value specified by attr is invalid.

The pthread_barrierattr_init() function will fail if:

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

The pthread_barrierattr_setpshared() function will fail if:

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

pthread_barrier_destroy(3), pthread_barrier_init(3), pthread_barrier_wait(3)

The pthread_barrierattr_*() functions first appeared in N:M Threading Library (libkse, -lkse) in FreeBSD 5.2, and in 1:1 Threading Library (libthr, -lthr) in FreeBSD 5.3. Support for process-shared barriers appeared in FreeBSD 11.0.
August 17, 2018 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.