bt2c::Logger: remove unused cLevel() method
[babeltrace.git] / src / lib / graph / interrupter.h
1 /*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright (c) 2019 Philippe Proulx <pproulx@efficios.com>
5 */
6
7 #ifndef BABELTRACE_GRAPH_INTERRUPTER_INTERNAL_H
8 #define BABELTRACE_GRAPH_INTERRUPTER_INTERNAL_H
9
10 #include <stdbool.h>
11
12 #include <glib.h>
13 #include <babeltrace2/babeltrace.h>
14
15 #include "lib/object.h"
16
17 struct bt_interrupter {
18 struct bt_object base;
19 bool is_set;
20 };
21
22 static inline
23 bool bt_interrupter_array_any_is_set(const GPtrArray *interrupters)
24 {
25 bool is_set = false;
26 uint64_t i;
27
28 BT_ASSERT_DBG(interrupters);
29
30 for (i = 0; i < interrupters->len; i++) {
31 const struct bt_interrupter *intr = interrupters->pdata[i];
32
33 if (intr->is_set) {
34 is_set = true;
35 goto end;
36 }
37 }
38
39 end:
40 return is_set;
41 }
42
43 #endif /* BABELTRACE_GRAPH_INTERRUPTER_INTERNAL_H */
This page took 0.030995 seconds and 4 git commands to generate.