projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make lf stack push return if the stack was empty
[userspace-rcu.git]
/
rculfstack.c
diff --git
a/rculfstack.c
b/rculfstack.c
index 2c260460b690ee85e9f688a372feae56a1b5889d..f58628ce4ea06f55185fb75682cbc9f6b974ef36 100644
(file)
--- a/
rculfstack.c
+++ b/
rculfstack.c
@@
-21,10
+21,20
@@
*/
/* Use the urcu symbols to select the appropriate rcu flavor at link time */
*/
/* Use the urcu symbols to select the appropriate rcu flavor at link time */
-#include "urcu.h"
+#define _LGPL_SOURCE
+
+#ifdef RCU_QSBR
+# include "urcu-qsbr.h"
+#elif defined(RCU_BP)
+# include "urcu-bp.h"
+#else
+# include "urcu.h"
+#endif
+
+#undef _LGPL_SOURCE
/* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */
#include "urcu/rculfstack.h"
/* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */
#include "urcu/rculfstack.h"
-#include "urcu/
rculfstack-static
.h"
+#include "urcu/
static/rculfstack
.h"
/*
* library wrappers to be used by non-LGPL compatible source code.
/*
* library wrappers to be used by non-LGPL compatible source code.
@@
-41,9
+51,10
@@
void cds_lfs_init_rcu(struct cds_lfs_stack_rcu *s)
_cds_lfs_init_rcu(s);
}
_cds_lfs_init_rcu(s);
}
-void cds_lfs_push_rcu(struct cds_lfs_stack_rcu *s, struct cds_lfs_node_rcu *node)
+int cds_lfs_push_rcu(struct cds_lfs_stack_rcu *s,
+ struct cds_lfs_node_rcu *node)
{
{
- _cds_lfs_push_rcu(s, node);
+
return
_cds_lfs_push_rcu(s, node);
}
struct cds_lfs_node_rcu *cds_lfs_pop_rcu(struct cds_lfs_stack_rcu *s)
}
struct cds_lfs_node_rcu *cds_lfs_pop_rcu(struct cds_lfs_stack_rcu *s)
This page took
0.024261 seconds
and
4
git commands to generate.