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 cds_wfs_node
*next
;
38 struct cds_wfs_stack
{
39 struct cds_wfs_node
*head
;
45 #include <urcu/static/wfstack.h>
47 #define cds_wfs_node_init _cds_wfs_node_init
48 #define cds_wfs_init _cds_wfs_init
49 #define cds_wfs_push _cds_wfs_push
50 #define __cds_wfs_pop_blocking ___cds_wfs_pop_blocking
51 #define cds_wfs_pop_blocking _cds_wfs_pop_blocking
53 #else /* !_LGPL_SOURCE */
55 extern void cds_wfs_node_init(struct cds_wfs_node
*node
);
56 extern void cds_wfs_init(struct cds_wfs_stack
*s
);
57 extern void cds_wfs_push(struct cds_wfs_stack
*s
, struct cds_wfs_node
*node
);
58 /* __cds_wfs_pop_blocking: caller ensures mutual exclusion between pops */
59 extern struct cds_wfs_node
*__cds_wfs_pop_blocking(struct cds_wfs_stack
*s
);
60 extern struct cds_wfs_node
*cds_wfs_pop_blocking(struct cds_wfs_stack
*s
);
62 #endif /* !_LGPL_SOURCE */
68 #endif /* _URCU_WFSTACK_H */
This page took 0.030441 seconds and 4 git commands to generate.