Barrelfish
|
Header file for barrier functions. More...
Functions | |
errval_t | oct_barrier_enter (const char *, char **, size_t) |
Client enters a barrier. Blocks until all clients have entered the barrier. More... | |
errval_t | oct_barrier_leave (const char *) |
Leave a barrier. Blocks until all involved parties have called oct_barrier_leave(). More... | |
Header file for barrier functions.
errval_t oct_barrier_enter | ( | const char * | name, |
char ** | barrier_record, | ||
size_t | wait_for | ||
) |
Client enters a barrier. Blocks until all clients have entered the barrier.
Each client creates a (sequential record) based on the provided name. Once a client sees the specified amount (wait_for) of records it creates a record that wakes up all waiting clients.
[in] | name | Name of the barrier. |
[out] | barrier_record | Record created for each client. |
[in] | wait_for | Number of clients entering the barrier. |
errval_t oct_barrier_leave | ( | const char * | barrier_record | ) |
Leave a barrier. Blocks until all involved parties have called oct_barrier_leave().
Client deletes its barrier record. In case the client was the last one we delete the special record which wakes up all other clients.
barrier_record | Clients own record as provided by oct_barrier_enter. |