projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix: exclude clang from GCC version blacklists
[userspace-rcu.git]
/
src
/
urcu-bp.c
diff --git
a/src/urcu-bp.c
b/src/urcu-bp.c
index 0653f9dff769b89281d5ec2edf4608d5604edbdf..c2ac792c219f825936e1e3676907e8b8cf9ea01a 100644
(file)
--- a/
src/urcu-bp.c
+++ b/
src/urcu-bp.c
@@
-23,6
+23,7
@@
* IBM's contributions to this file may be relicensed under LGPLv2 or later.
*/
* IBM's contributions to this file may be relicensed under LGPLv2 or later.
*/
+#define URCU_NO_COMPAT_IDENTIFIERS
#define _LGPL_SOURCE
#include <stdio.h>
#include <pthread.h>
#define _LGPL_SOURCE
#include <stdio.h>
#include <pthread.h>
@@
-36,6
+37,7
@@
#include <stdbool.h>
#include <sys/mman.h>
#include <stdbool.h>
#include <sys/mman.h>
+#include <urcu/config.h>
#include <urcu/arch.h>
#include <urcu/wfcqueue.h>
#include <urcu/map/urcu-bp.h>
#include <urcu/arch.h>
#include <urcu/wfcqueue.h>
#include <urcu/map/urcu-bp.h>
@@
-151,8
+153,7
@@
URCU_ATTR_ALIAS("urcu_bp_gp") extern struct urcu_bp_gp rcu_gp_bp;
* by both the reader and the writers.
*/
DEFINE_URCU_TLS(struct urcu_bp_reader *, urcu_bp_reader);
* by both the reader and the writers.
*/
DEFINE_URCU_TLS(struct urcu_bp_reader *, urcu_bp_reader);
-URCU_ATTR_ALIAS("urcu_bp_reader")
-extern struct urcu_bp_reader *rcu_reader_bp;
+DEFINE_URCU_TLS_ALIAS(struct urcu_bp_reader *, urcu_bp_reader, rcu_reader_bp);
static CDS_LIST_HEAD(registry);
static CDS_LIST_HEAD(registry);
@@
-566,6
+567,12
@@
end:
}
URCU_ATTR_ALIAS("urcu_bp_register") void rcu_bp_register();
}
URCU_ATTR_ALIAS("urcu_bp_register") void rcu_bp_register();
+void urcu_bp_register_thread(void)
+{
+ if (caa_unlikely(!URCU_TLS(urcu_bp_reader)))
+ urcu_bp_register(); /* If not yet registered. */
+}
+
/* Disable signals, take mutex, remove from registry */
static
void urcu_bp_unregister(struct rcu_reader *rcu_reader_reg)
/* Disable signals, take mutex, remove from registry */
static
void urcu_bp_unregister(struct rcu_reader *rcu_reader_reg)
This page took
0.02459 seconds
and
4
git commands to generate.