API to manage barriers. More...
#include "gnunet_testing_plugin.h"
Go to the source code of this file.
Data Structures | |
struct | GNUNET_TESTING_BarrierListEntry |
An entry for a barrier list. More... | |
struct | GNUNET_TESTING_BarrierList |
A list to hold barriers provided by plugins. More... | |
Macros | |
#define | GNUNET_TESTING_BARRIER_MAX 32 |
Functions | |
struct GNUNET_TESTING_Command | GNUNET_TESTING_cmd_barrier_create (const char *label, double percentage_to_be_reached, unsigned int number_to_be_reached) |
Command to create a barrier. More... | |
struct GNUNET_TESTING_Command | GNUNET_TESTING_cmd_barrier_reached (const char *label, const char *barrier_label, unsigned int asynchronous_finish, unsigned int node_number, unsigned int running_on_master, GNUNET_TESTING_cmd_helper_write_cb write_message) |
If this command is executed the the process is signaling the master process that it reached a barrier. More... | |
API to manage barriers.
Definition in file gnunet_testing_barrier.h.
#define GNUNET_TESTING_BARRIER_MAX 32 |
Definition at line 32 of file gnunet_testing_barrier.h.
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_barrier_create | ( | const char * | label, |
double | percentage_to_be_reached, | ||
unsigned int | number_to_be_reached | ||
) |
Command to create a barrier.
FIXME: high-level it is baffling how we need both the GNUNET_TESTING_Barrier and the Command that creates barriers. Conceptually this seems to be very much separate. Can we move _Barrier completely into testing as private?
label | The label of this command. |
percentage_to_be_reached | If this percentage of processes reached this barrier, all processes waiting at this barrier can pass it. Must not be used together with number_to_be_reached. |
number_to_be_reached | If this number of processes reached this barrier, all processes waiting at this barrier can pass it. Must not be used together with percentage_to_be_reached. |
Definition at line 166 of file testing_api_cmd_barrier.c.
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_barrier_reached | ( | const char * | label, |
const char * | barrier_label, | ||
unsigned int | asynchronous_finish, | ||
unsigned int | node_number, | ||
unsigned int | running_on_master, | ||
GNUNET_TESTING_cmd_helper_write_cb | write_message | ||
) |
If this command is executed the the process is signaling the master process that it reached a barrier.
If this command is synchronous it will block.
FIXME: Now this, as it returns a Command, seems to me like it should be part of the public API?
label | name for command. |
barrier_label | The name of the barrier we waited for and which was reached. |
asynchronous_finish | If GNUNET_YES this command will not block. |
node_number | The global number of the node the cmd runs on. |
running_on_master | Is this cmd running on the master loop? |
write_message | Callback to write messages to the master loop. |
If this command is executed the the process is signaling the master process that it reached a barrier.
label | name for command. |
barrier_label | The name of the barrier we wait for (if finishing asynchronous) and which will be reached. |
asynchronous_finish | If GNUNET_YES this command will not block. |
node_number | The global numer of the node the cmd runs on. |
running_on_master | Is this cmd running on the master loop. |
write_message | Callback to write messages to the master loop. |
Definition at line 157 of file testing_api_cmd_barrier_reached.c.