![]() |
posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
|
POSIX Barriers option group. More...
Macros | |
| #define | PTHREAD_BARRIER_SERIAL_THREAD 1 |
| Returned by pthread_barrier_wait() to one (arbitrary) thread per barrier cycle. | |
Functions | |
| int | pthread_barrier_destroy (pthread_barrier_t *barrier) |
| Destroy a barrier object. | |
| int | pthread_barrier_init (pthread_barrier_t *ZRESTRICT barrier, const pthread_barrierattr_t *ZRESTRICT attr, unsigned int count) |
| Initialise a barrier object. | |
| int | pthread_barrier_wait (pthread_barrier_t *barrier) |
| Synchronise participating threads at a barrier. | |
| int | pthread_barrierattr_destroy (pthread_barrierattr_t *attr) |
| Destroy a barrier attributes object. | |
| int | pthread_barrierattr_getpshared (const pthread_barrierattr_t *ZRESTRICT attr, int *ZRESTRICT pshared) |
| Get the process-shared attribute of a barrier attributes object. | |
| int | pthread_barrierattr_init (pthread_barrierattr_t *attr) |
| Initialise a barrier attributes object with default values. | |
| int | pthread_barrierattr_setpshared (pthread_barrierattr_t *attr, int pshared) |
| Set the process-shared attribute of a barrier attributes object. | |
POSIX Barriers option group.
| #define PTHREAD_BARRIER_SERIAL_THREAD 1 |
Returned by pthread_barrier_wait() to one (arbitrary) thread per barrier cycle.
| int pthread_barrier_destroy | ( | pthread_barrier_t * | barrier | ) |
Destroy a barrier object.
| barrier | Barrier to destroy. |
| int pthread_barrier_init | ( | pthread_barrier_t *ZRESTRICT | barrier, |
| const pthread_barrierattr_t *ZRESTRICT | attr, | ||
| unsigned int | count | ||
| ) |
Initialise a barrier object.
| barrier | Barrier to initialise. |
| attr | Barrier attributes, or NULL for defaults. |
| count | Number of threads that must call pthread_barrier_wait() before any proceeds. |
| int pthread_barrier_wait | ( | pthread_barrier_t * | barrier | ) |
Synchronise participating threads at a barrier.
Blocks until count threads have called this function on the same barrier. Exactly one thread receives PTHREAD_BARRIER_SERIAL_THREAD as the return value.
| barrier | Barrier to wait on. |
PTHREAD_BARRIER_SERIAL_THREAD for one thread, 0 for all others, or a positive error number on failure. | int pthread_barrierattr_destroy | ( | pthread_barrierattr_t * | attr | ) |
Destroy a barrier attributes object.
| attr | Barrier attributes object to destroy. |
| int pthread_barrierattr_getpshared | ( | const pthread_barrierattr_t *ZRESTRICT | attr, |
| int *ZRESTRICT | pshared | ||
| ) |
Get the process-shared attribute of a barrier attributes object.
| attr | Barrier attributes object. |
| pshared | Output: PTHREAD_PROCESS_SHARED or PTHREAD_PROCESS_PRIVATE. |
| int pthread_barrierattr_init | ( | pthread_barrierattr_t * | attr | ) |
Initialise a barrier attributes object with default values.
| attr | Barrier attributes object to initialise. |
| int pthread_barrierattr_setpshared | ( | pthread_barrierattr_t * | attr, |
| int | pshared | ||
| ) |
Set the process-shared attribute of a barrier attributes object.
| attr | Barrier attributes object. |
| pshared | PTHREAD_PROCESS_SHARED or PTHREAD_PROCESS_PRIVATE. |