#include "platform.h"
#include "gnunet_testing_lib.h"
#include "testing_api_barrier.h"
#include "testing_api_loop.h"
Go to the source code of this file.
Functions | |
static enum GNUNET_GenericReturnValue | barrier_traits (void *cls, const void **ret, const char *trait, unsigned int index) |
Offer internal data from a "barrier" CMD, to other commands. More... | |
static void | barrier_cleanup (void *cls) |
Cleanup the state from a "barrier" CMD, and possibly cancel a pending operation thereof. More... | |
static void | barrier_run (void *cls, struct GNUNET_TESTING_Interpreter *is) |
Run the command. More... | |
struct GNUNET_TESTING_Command | GNUNET_TESTING_cmd_barrier_create (const char *label, unsigned int number_to_be_reached) |
Command to create a barrier. More... | |
|
static |
Offer internal data from a "barrier" 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 42 of file testing_api_cmd_barrier_create.c.
References GNUNET_TESTING_get_trait(), GNUNET_TESTING_trait_end(), GNUNET_TESTING_Trait::index, ret, and traits().
Referenced by GNUNET_TESTING_cmd_barrier_create().
|
static |
Cleanup the state from a "barrier" CMD, and possibly cancel a pending operation thereof.
cls | closure. |
Definition at line 65 of file testing_api_cmd_barrier_create.c.
References GNUNET_free.
Referenced by GNUNET_TESTING_cmd_barrier_create().
|
static |
Run the command.
cls | closure. |
is | the interpreter state. |
Definition at line 80 of file testing_api_cmd_barrier_create.c.
References GNUNET_TESTING_add_barrier_(), and is.
Referenced by GNUNET_TESTING_cmd_barrier_create().
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_barrier_create | ( | const char * | label, |
unsigned int | number_to_be_reached | ||
) |
Command to create a barrier.
label | The label of this command. |
number_to_be_reached | If this number of processes reached this barrier, all processes waiting at this barrier can pass it. |
Definition at line 91 of file testing_api_cmd_barrier_create.c.
References barrier_cleanup(), GNUNET_TESTING_Barrier::barrier_id, barrier_run(), barrier_traits(), GNUNET_TESTING_Barrier::expected_reaches, GNUNET_new, GNUNET_TESTING_barrier_name_hash_(), and GNUNET_TESTING_command_new.
Referenced by main().