2 * Copyright (C) 2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
5 * SPDX-License-Identifier: LGPL-2.1-only
7 * This code is originally adapted from userspace-rcu's urcu-wait.h
10 #ifndef LTTNG_WAITER_H
11 #define LTTNG_WAITER_H
16 #include <urcu/wfstack.h>
21 struct cds_wfs_node wait_queue_node;
25 void lttng_waiter_init(struct lttng_waiter *waiter);
27 void lttng_waiter_wait(struct lttng_waiter *waiter);
30 * lttng_waiter_wake_up must only be called by a single waker.
31 * It is invalid for multiple "wake" operations to be invoked
32 * on a single waiter without re-initializing it before.
34 void lttng_waiter_wake_up(struct lttng_waiter *waiter);
36 #endif /* LTTNG_WAITER_H */