projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "CDS API: removal of rcu_read lock/unlock dep, removal of call_rcu argument...
[urcu.git]
/
urcu
/
static
/
urcu-qsbr.h
diff --git
a/urcu/static/urcu-qsbr.h
b/urcu/static/urcu-qsbr.h
index 5b7adac658bfe1b64264d3adcf2b06e0a00c2430..489abb0c399cc1026b387f37960530dfb9400bdf 100644
(file)
--- a/
urcu/static/urcu-qsbr.h
+++ b/
urcu/static/urcu-qsbr.h
@@
-124,6
+124,7
@@
struct rcu_reader {
unsigned long ctr;
/* Data used for registry */
struct cds_list_head node __attribute__((aligned(CAA_CACHE_LINE_SIZE)));
unsigned long ctr;
/* Data used for registry */
struct cds_list_head node __attribute__((aligned(CAA_CACHE_LINE_SIZE)));
+ int waiting;
pthread_t tid;
};
pthread_t tid;
};
@@
-136,7
+137,11
@@
extern int32_t gp_futex;
*/
static inline void wake_up_gp(void)
{
*/
static inline void wake_up_gp(void)
{
- if (unlikely(uatomic_read(&gp_futex) == -1)) {
+ if (unlikely(_CMM_LOAD_SHARED(rcu_reader.waiting))) {
+ _CMM_STORE_SHARED(rcu_reader.waiting, 0);
+ cmm_smp_mb();
+ if (uatomic_read(&gp_futex) != -1)
+ return;
uatomic_set(&gp_futex, 0);
futex_noasync(&gp_futex, FUTEX_WAKE, 1,
NULL, NULL, 0);
uatomic_set(&gp_futex, 0);
futex_noasync(&gp_futex, FUTEX_WAKE, 1,
NULL, NULL, 0);
This page took
0.025626 seconds
and
4
git commands to generate.