API implementation for testbed barriers. More...
Go to the source code of this file.
Data Structures | |
struct | GNUNET_TESTBED_BarrierWaitHandle |
Barrier wait handle. More... | |
Macros | |
#define | LOG(type, ...) GNUNET_log_from (type, "testbed-api-barriers", __VA_ARGS__); |
Logging shorthand. More... | |
#define | LOG_DEBUG(...) LOG (GNUNET_ERROR_TYPE_DEBUG, __VA_ARGS__); |
Debug logging shorthand. More... | |
Functions | |
static int | check_status (void *cls, const struct GNUNET_TESTBED_BarrierStatusMsg *msg) |
Check if barrier status message is well-formed. More... | |
static void | handle_status (void *cls, const struct GNUNET_TESTBED_BarrierStatusMsg *msg) |
Type of a function to call when we receive a message from the service. More... | |
static void | mq_error_handler (void *cls, enum GNUNET_MQ_Error error) |
Generic error handler, called with the appropriate error code and the same closure specified at the creation of the message queue. More... | |
struct GNUNET_TESTBED_BarrierWaitHandle * | GNUNET_TESTBED_barrier_wait (const char *name, GNUNET_TESTBED_barrier_wait_cb cb, void *cb_cls) |
Wait for a barrier to be crossed. More... | |
void | GNUNET_TESTBED_barrier_wait_cancel (struct GNUNET_TESTBED_BarrierWaitHandle *h) |
Cancel a barrier wait handle. More... | |
API implementation for testbed barriers.
Definition in file testbed_api_barriers.c.
#define LOG | ( | type, | |
... | |||
) | GNUNET_log_from (type, "testbed-api-barriers", __VA_ARGS__); |
Logging shorthand.
Definition at line 33 of file testbed_api_barriers.c.
#define LOG_DEBUG | ( | ... | ) | LOG (GNUNET_ERROR_TYPE_DEBUG, __VA_ARGS__); |
Debug logging shorthand.
Definition at line 39 of file testbed_api_barriers.c.
|
static |
Check if barrier status message is well-formed.
cls | closure |
msg | received message |
Definition at line 83 of file testbed_api_barriers.c.
References GNUNET_OK.
|
static |
Type of a function to call when we receive a message from the service.
cls | closure |
msg | received message |
Definition at line 102 of file testbed_api_barriers.c.
References GNUNET_break, GNUNET_break_op, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_OK, GNUNET_SYSERR, GNUNET_TESTBED_barrier_wait_cancel(), GNUNET_TESTBED_BARRIERSTATUS_CROSSED, GNUNET_TESTBED_BARRIERSTATUS_ERROR, GNUNET_TESTBED_BARRIERSTATUS_INITIALISED, h, and msg.
|
static |
Generic error handler, called with the appropriate error code and the same closure specified at the creation of the message queue.
Not every message queue implementation supports an error handler.
cls | closure with the struct GNUNET_TESTBED_BarrierWaitHandle * |
error | error code |
Definition at line 151 of file testbed_api_barriers.c.
References GNUNET_SYSERR, GNUNET_TESTBED_barrier_wait_cancel(), and h.
Referenced by GNUNET_TESTBED_barrier_wait().