X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=rculfstack.c;fp=rculfstack.c;h=01d549bb9b1b69cbfd9935c1a2fe898a4717c688;hp=0000000000000000000000000000000000000000;hb=b6a37eaca5f072e7bba90a2562b7f2ac238fe23b;hpb=3d02c34dba0edc4a3554a3862a2ae96d77b3b4e8 diff --git a/rculfstack.c b/rculfstack.c new file mode 100644 index 0000000..01d549b --- /dev/null +++ b/rculfstack.c @@ -0,0 +1,52 @@ +/* + * rculfstack.c + * + * Userspace RCU library - Lock-Free RCU Stack + * + * Copyright 2010 - Mathieu Desnoyers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* Use the urcu symbols to select the appropriate rcu flavor at link time */ +#include "urcu.h" +/* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */ +#include "urcu/rculfstack.h" +#include "urcu/rculfstack-static.h" + +/* + * library wrappers to be used by non-LGPL compatible source code. + */ + + +void rcu_lfs_node_init(struct rcu_lfs_node *node) +{ + _rcu_lfs_node_init(node); +} + +void rcu_lfs_init(struct rcu_lfs_stack *s) +{ + _rcu_lfs_init(s); +} + +void rcu_lfs_push(struct rcu_lfs_stack *s, struct rcu_lfs_node *node) +{ + _rcu_lfs_push(s, node); +} + +struct rcu_lfs_node *rcu_lfs_pop(struct rcu_lfs_stack *s) +{ + return _rcu_lfs_pop(s); +}