projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ppc atomic: fix atomic_dec/inc
[urcu.git]
/
urcu.c
diff --git
a/urcu.c
b/urcu.c
index d474fc8a3e8311c036f151698afdeaab7bde192a..32f74880492ce40527c8b5b40560249eac485b90 100644
(file)
--- a/
urcu.c
+++ b/
urcu.c
@@
-37,6
+37,8
@@
#include "urcu.h"
#ifndef URCU_MB
#include "urcu.h"
#ifndef URCU_MB
+static int init_done;
+
void __attribute__((constructor)) urcu_init(void);
void __attribute__((destructor)) urcu_exit(void);
#else
void __attribute__((constructor)) urcu_init(void);
void __attribute__((destructor)) urcu_exit(void);
#else
@@
-45,8
+47,6
@@
void urcu_init(void)
}
#endif
}
#endif
-static int init_done;
-
static pthread_mutex_t urcu_mutex = PTHREAD_MUTEX_INITIALIZER;
/*
static pthread_mutex_t urcu_mutex = PTHREAD_MUTEX_INITIALIZER;
/*
@@
-347,6
+347,12
@@
void *rcu_xchg_pointer_sym(void **p, void *v)
return xchg(p, v);
}
return xchg(p, v);
}
+void *rcu_cmpxchg_pointer_sym(void **p, void *old, void *_new)
+{
+ wmb();
+ return cmpxchg(p, old, _new);
+}
+
void *rcu_publish_content_sym(void **p, void *v)
{
void *oldptr;
void *rcu_publish_content_sym(void **p, void *v)
{
void *oldptr;
This page took
0.024958 seconds
and
4
git commands to generate.