projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add compiler barriers to read-side for mutex ordering
[urcu.git]
/
urcu-qsbr-static.h
diff --git
a/urcu-qsbr-static.h
b/urcu-qsbr-static.h
index 86f0fc507449451d70f276571d3c6aa1be61d98a..147eb18b94357ee885216d3db65f252d54143944 100644
(file)
--- a/
urcu-qsbr-static.h
+++ b/
urcu-qsbr-static.h
@@
-9,7
+9,7
@@
* TO BE INCLUDED ONLY IN LGPL-COMPATIBLE CODE. See urcu-qsbr.h for linking
* dynamically with the userspace rcu QSBR library.
*
* TO BE INCLUDED ONLY IN LGPL-COMPATIBLE CODE. See urcu-qsbr.h for linking
* dynamically with the userspace rcu QSBR library.
*
- * Copyright (c) 2009 Mathieu Desnoyers <mathieu.desnoyers@
polymtl.ca
>
+ * Copyright (c) 2009 Mathieu Desnoyers <mathieu.desnoyers@
efficios.com
>
* Copyright (c) 2009 Paul E. McKenney, IBM Corporation.
*
* This library is free software; you can redistribute it and/or
* Copyright (c) 2009 Paul E. McKenney, IBM Corporation.
*
* This library is free software; you can redistribute it and/or
@@
-187,10
+187,12
@@
static inline void _rcu_thread_offline(void)
STORE_SHARED(rcu_reader.ctr, 0);
smp_mb(); /* write rcu_reader.ctr before read futex */
wake_up_gp();
STORE_SHARED(rcu_reader.ctr, 0);
smp_mb(); /* write rcu_reader.ctr before read futex */
wake_up_gp();
+ barrier(); /* Ensure the compiler does not reorder us with mutex */
}
static inline void _rcu_thread_online(void)
{
}
static inline void _rcu_thread_online(void)
{
+ barrier(); /* Ensure the compiler does not reorder us with mutex */
_STORE_SHARED(rcu_reader.ctr, LOAD_SHARED(rcu_gp_ctr));
smp_mb();
}
_STORE_SHARED(rcu_reader.ctr, LOAD_SHARED(rcu_gp_ctr));
smp_mb();
}
This page took
0.031071 seconds
and
4
git commands to generate.