projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
uatomic: update atomic set/read, use STORE_SHARED/LOAD_SHARED
[userspace-rcu.git]
/
urcu
/
uatomic_arch_s390.h
diff --git
a/urcu/uatomic_arch_s390.h
b/urcu/uatomic_arch_s390.h
index b37e5f0fbf4a771aec326e04e3c6abc468f4a4ff..db05b15b996a36f61a0a9ed3fff96fddcbb977c4 100644
(file)
--- a/
urcu/uatomic_arch_s390.h
+++ b/
urcu/uatomic_arch_s390.h
@@
-28,6
+28,9
@@
* IN THE SOFTWARE.
*/
* IN THE SOFTWARE.
*/
+#include <urcu/compiler.h>
+#include <urcu/system.h>
+
#ifndef __SIZEOF_LONG__
#ifdef __s390x__
#define __SIZEOF_LONG__ 8
#ifndef __SIZEOF_LONG__
#ifdef __s390x__
#define __SIZEOF_LONG__ 8
@@
-40,12
+43,8
@@
#define BITS_PER_LONG (__SIZEOF_LONG__ * 8)
#endif
#define BITS_PER_LONG (__SIZEOF_LONG__ * 8)
#endif
-#define uatomic_set(addr, v) \
-do { \
- ACCESS_ONCE(*(addr)) = (v); \
-} while (0)
-
-#define uatomic_read(addr) ACCESS_ONCE(*(addr))
+#define uatomic_set(addr, v) STORE_SHARED(*(addr), (v))
+#define uatomic_read(addr) LOAD_SHARED(*(addr))
static inline __attribute__((always_inline))
unsigned int uatomic_exchange_32(volatile unsigned int *addr, unsigned int val)
static inline __attribute__((always_inline))
unsigned int uatomic_exchange_32(volatile unsigned int *addr, unsigned int val)
This page took
0.028133 seconds
and
4
git commands to generate.