Barrelfish
Functions
barrier.h File Reference

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...
 

Detailed Description

Header file for barrier functions.

Function Documentation

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.

Parameters
[in]nameName of the barrier.
[out]barrier_recordRecord created for each client.
[in]wait_forNumber 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.

Parameters
barrier_recordClients own record as provided by oct_barrier_enter.