GNUnet
0.22.0
testing_api_barrier.h
Go to the documentation of this file.
1
/*
2
This file is part of GNUnet
3
Copyright (C) 2022 GNUnet e.V.
4
5
GNUnet is free software: you can redistribute it and/or modify it
6
under the terms of the GNU Affero General Public License as published
7
by the Free Software Foundation, either version 3 of the License,
8
or (at your option) any later version.
9
10
GNUnet is distributed in the hope that it will be useful, but
11
WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
Affero General Public License for more details.
14
15
You should have received a copy of the GNU Affero General Public License
16
along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18
SPDX-License-Identifier: AGPL3.0-or-later
19
*/
20
27
#ifndef TESTING_API_BARRIER_H
28
#define TESTING_API_BARRIER_H
29
33
struct
GNUNET_TESTING_Barrier
34
{
35
36
struct
GNUNET_ShortHashCode
barrier_id
;
37
42
struct
GNUNET_TESTING_AsyncContext
**
waiting
;
43
47
unsigned
int
cnt_waiting
;
48
52
unsigned
int
expected_reaches
;
53
58
unsigned
int
reached
;
59
63
bool
inherited
;
64
69
bool
satisfied
;
70
71
};
72
73
74
void
75
GNUNET_TESTING_barrier_name_hash_
(
76
const
char
*barrier_name,
77
struct
GNUNET_ShortHashCode
*bkey);
78
79
80
#endif
81
/* end of barrier.h */
GNUNET_ShortHashCode
A 256-bit hashcode.
Definition:
gnunet_common.h:294
GNUNET_TESTING_AsyncContext
State each asynchronous command must have in its closure.
Definition:
gnunet_testing_lib.h:81
GNUNET_TESTING_Barrier
An entry for a barrier list.
Definition:
testing_api_barrier.h:34
GNUNET_TESTING_Barrier::inherited
bool inherited
Did we inherit the barrier from our parent loop?
Definition:
testing_api_barrier.h:63
GNUNET_TESTING_Barrier::barrier_id
struct GNUNET_ShortHashCode barrier_id
Definition:
testing_api_barrier.h:36
GNUNET_TESTING_Barrier::reached
unsigned int reached
Number of times the barrier has been reached.
Definition:
testing_api_barrier.h:58
GNUNET_TESTING_Barrier::expected_reaches
unsigned int expected_reaches
Number of total commands expected to be reached by the barrier.
Definition:
testing_api_barrier.h:52
GNUNET_TESTING_Barrier::waiting
struct GNUNET_TESTING_AsyncContext ** waiting
Context of barrier reached commands of our local interpreter that are currently blocked on this barri...
Definition:
testing_api_barrier.h:42
GNUNET_TESTING_Barrier::cnt_waiting
unsigned int cnt_waiting
Length of the waiting array.
Definition:
testing_api_barrier.h:47
GNUNET_TESTING_Barrier::satisfied
bool satisfied
Did we reach expected_reaches? Used in particular if inherited is true and we cannot compute locally.
Definition:
testing_api_barrier.h:69
GNUNET_TESTING_barrier_name_hash_
void GNUNET_TESTING_barrier_name_hash_(const char *barrier_name, struct GNUNET_ShortHashCode *bkey)
Definition:
testing_api_barrier.c:39
src
lib
testing
testing_api_barrier.h
Generated by
1.9.4