2 * Copyright (C) 2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 * 2017 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU Lesser General Public License, version 2.1 only,
7 * as published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 * This code is originally adapted from userspace-rcu's urcu-wait.h
21 #ifndef LTTNG_WAITER_H
22 #define LTTNG_WAITER_H
27 #include <urcu/wfstack.h>
32 struct cds_wfs_node wait_queue_node
;
37 void lttng_waiter_init(struct lttng_waiter
*waiter
);
40 void lttng_waiter_wait(struct lttng_waiter
*waiter
);
43 * lttng_waiter_wake_up must only be called by a single waker.
44 * It is invalid for multiple "wake" operations to be invoked
45 * on a single waiter without re-initializing it before.
48 void lttng_waiter_wake_up(struct lttng_waiter
*waiter
);
50 #endif /* LTTNG_WAITER_H */