56 barrier->
cls = cb_cls;
83 if ((!barrier) || (barrier->
task))
112 waiting = waiting->
next;
138 waiting->
cls = cb_cls;
139 waiting->
prev = NULL;
140 waiting->
next = NULL;
166 barrier->
task = NULL;
uint16_t status
See PRISM_STATUS_*-constants.
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
#define GNUNET_CONTAINER_DLL_insert_tail(head, tail, element)
Insert an element at the tail of a DLL.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_free(ptr)
Wrapper around free.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
struct GNUNET_BarrierWaitHandle * head
struct GNUNET_BarrierWaitHandle * tail
GNUNET_BarrierStatusCallback cb
struct GNUNET_SCHEDULER_Task * task
GNUNET_BarrierWaitStatusCallback cb
struct GNUNET_BarrierHandle * barrier
struct GNUNET_BarrierWaitHandle * prev
struct GNUNET_BarrierWaitHandle * next
Entry in list of pending tasks.
static void exit_status(struct GNUNET_BarrierHandle *barrier, int status)
void GNUNET_cancel_barrier(struct GNUNET_BarrierHandle *barrier)
Cancel a pseudo-barrier.
void GNUNET_cancel_wait_barrier(struct GNUNET_BarrierWaitHandle *waiting)
Cancel a pseudo-barrier wait handle.
struct GNUNET_BarrierHandle * GNUNET_init_barrier(unsigned int requirement, GNUNET_BarrierStatusCallback cb, void *cb_cls)
Initialise a pseudo-barrier and call the given callback when the required amount of peers (requiremen...
static void complete_barrier(void *cls)
static void cancel_barrier(void *cls)
struct GNUNET_BarrierWaitHandle * GNUNET_wait_barrier(struct GNUNET_BarrierHandle *barrier, GNUNET_BarrierWaitStatusCallback cb, void *cb_cls)
Wait for a pseudo-barrier to be crossed.
Pseudo-barriers for simple event handling.
void(* GNUNET_BarrierWaitStatusCallback)(void *cls, struct GNUNET_BarrierWaitHandle *waiting, int status)
Functions of this type are to be given as acallback argument to GNUNET_wait_barrier().
void(* GNUNET_BarrierStatusCallback)(void *cls, struct GNUNET_BarrierHandle *barrier, int status)
Functions of this type are to be given as callback argument to GNUNET_init_barrier().