1 #ifndef _URCU_WFSTACK_H
2 #define _URCU_WFSTACK_H
7 * Userspace RCU library - Stack with Wait-Free push, Blocking pop.
9 * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2.1 of the License, or (at your option) any later version.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this library; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
28 #include <urcu/compiler.h>
35 struct wfs_node
*next
;
39 struct wfs_node
*head
;
45 #include <urcu/wfstack-static.h>
47 #define wfs_node_init _wfs_node_init
48 #define wfs_init _wfs_init
49 #define wfs_push _wfs_push
50 #define __wfs_pop_blocking ___wfs_pop_blocking
51 #define wfs_pop_blocking _wfs_pop_blocking
53 #else /* !_LGPL_SOURCE */
55 extern void wfs_node_init(struct wfs_node
*node
);
56 extern void wfs_init(struct wfs_stack
*s
);
57 extern void wfs_push(struct wfs_stack
*s
, struct wfs_node
*node
);
58 /* __wfs_pop_blocking: caller ensures mutual exclusion between pops */
59 extern struct wfs_node
*__wfs_pop_blocking(struct wfs_stack
*s
);
60 extern struct wfs_node
*wfs_pop_blocking(struct wfs_stack
*s
);
62 #endif /* !_LGPL_SOURCE */
68 #endif /* _URCU_WFSTACK_H */
This page took 0.031841 seconds and 5 git commands to generate.