Simple tools for multi threading / objects in plain C Snapshot
Classes | Functions
cbarrier.h File Reference
#include <pthread.h>

Go to the source code of this file.

Classes

struct  CYCLIC_BARRIER

Functions

void CYCLIC_BARRIER_init (CYCLIC_BARRIER *cond, int num)
 initialises a new cyclic barrier
int CYCLIC_BARRIER_free (CYCLIC_BARRIER *cond)
 Frees a cyclic barrier.
int CYCLIC_BARRIER_await (CYCLIC_BARRIER *cond)
 All threads call this function, nobody continues untill all have called this function.
int CYCLIC_BARRIER_reset (CYCLIC_BARRIER *cond)
 Returns cyclic barrier to it's initial state.