Command to signal barrier was reached. More...
#include "platform.h"
#include "gnunet_testing_lib.h"
#include "testing_api_loop.h"
#include "testing_cmds.h"
Go to the source code of this file.
Data Structures | |
struct | BarrierReachedState |
Struct with information for callbacks. More... | |
Macros | |
#define | LOG(kind, ...) GNUNET_log (kind, __VA_ARGS__) |
Generic logging shortcut. More... | |
Functions | |
static void | barrier_reached_run (void *cls, struct GNUNET_TESTING_Interpreter *is) |
Run the command. More... | |
static void | barrier_reached_cleanup (void *cls) |
Cleanup the state from a "barrier reached" CMD, and possibly cancel a pending operation thereof. More... | |
static enum GNUNET_GenericReturnValue | barrier_reached_traits (void *cls, const void **ret, const char *trait, unsigned int index) |
Offer internal data from a "batch" CMD, to other commands. More... | |
struct GNUNET_TESTING_Command | GNUNET_TESTING_cmd_barrier_reached (const char *label, const char *barrier_label) |
If this command is executed the the process is signaling the master process that it reached a barrier. More... | |
Command to signal barrier was reached.
Definition in file testing_api_cmd_barrier_reached.c.
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log (kind, __VA_ARGS__) |
Generic logging shortcut.
Definition at line 34 of file testing_api_cmd_barrier_reached.c.
|
static |
Run the command.
cls | closure. |
is | the interpreter state. |
Definition at line 67 of file testing_api_cmd_barrier_reached.c.
References BarrierReachedState::ac, GNUNET_TESTING_CommandBarrierReached::barrier_key, GNUNET_TESTING_CommandBarrierSatisfied::barrier_key, BarrierReachedState::barrier_name, GNUNET_TESTING_Barrier::cnt_waiting, GNUNET_TESTING_Barrier::expected_reaches, GNUNET_array_append, GNUNET_array_grow, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_MESSAGE_TYPE_CMDS_HELPER_BARRIER_CROSSABLE, GNUNET_MESSAGE_TYPE_CMDS_HELPER_BARRIER_REACHED, GNUNET_TESTING_async_fail(), GNUNET_TESTING_async_finish(), GNUNET_TESTING_barrier_name_hash_(), GNUNET_TESTING_get_barrier_(), GNUNET_TESTING_loop_notify_children_(), GNUNET_TESTING_loop_notify_parent_(), GNUNET_TESTING_CommandBarrierReached::header, GNUNET_TESTING_CommandBarrierSatisfied::header, GNUNET_TESTING_Barrier::inherited, is, GNUNET_TESTING_Barrier::reached, GNUNET_TESTING_Barrier::satisfied, GNUNET_MessageHeader::size, and GNUNET_TESTING_Barrier::waiting.
Referenced by GNUNET_TESTING_cmd_barrier_reached().
|
static |
Cleanup the state from a "barrier reached" CMD, and possibly cancel a pending operation thereof.
cls | closure. |
Definition at line 138 of file testing_api_cmd_barrier_reached.c.
References GNUNET_free.
Referenced by GNUNET_TESTING_cmd_barrier_reached().
|
static |
Offer internal data from a "batch" CMD, to other commands.
cls | closure. | |
[out] | ret | result. |
trait | name of the trait. | |
index | index number of the object to offer. |
Definition at line 156 of file testing_api_cmd_barrier_reached.c.
References GNUNET_TESTING_get_trait(), GNUNET_TESTING_trait_end(), GNUNET_TESTING_Trait::index, ret, and traits().
Referenced by GNUNET_TESTING_cmd_barrier_reached().
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_barrier_reached | ( | const char * | label, |
const char * | barrier_label | ||
) |
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.
label | name for command. |
barrier_label | The name of the barrier we waited for and which was reached. |
Definition at line 173 of file testing_api_cmd_barrier_reached.c.
References BarrierReachedState::ac, BarrierReachedState::barrier_name, barrier_reached_cleanup(), barrier_reached_run(), barrier_reached_traits(), GNUNET_new, GNUNET_TESTING_command_new_ac(), and BarrierReachedState::label.