projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Special-case reader/writer busy-loop for signals in progress
[urcu.git]
/
arch_atomic_ppc.h
diff --git
a/arch_atomic_ppc.h
b/arch_atomic_ppc.h
index 13d56b4a3a16b2d6e1293e75aede6918c9bcd422..d666230fea7a80b0ee495990ce2e661750ebd406 100644
(file)
--- a/
arch_atomic_ppc.h
+++ b/
arch_atomic_ppc.h
@@
-20,11
+20,19
@@
* Boehm-Demers-Weiser conservative garbage collector.
*/
* Boehm-Demers-Weiser conservative garbage collector.
*/
+#ifndef __SIZEOF_LONG__
+#ifdef __powerpc64__
+#define __SIZEOF_LONG__ 8
+#else
+#define __SIZEOF_LONG__ 4
+#endif
+#endif
+
#ifndef BITS_PER_LONG
#define BITS_PER_LONG (__SIZEOF_LONG__ * 8)
#endif
#ifndef BITS_PER_LONG
#define BITS_PER_LONG (__SIZEOF_LONG__ * 8)
#endif
-#define ILLEGAL_INSTR
.long 0xd00d00
+#define ILLEGAL_INSTR
".long 0xd00d00"
#ifndef _INCLUDE_API_H
#ifndef _INCLUDE_API_H
@@
-46,7
+54,7
@@
unsigned int atomic_exchange_32(volatile unsigned int *addr, unsigned int val)
"stwcx. %2,0,%1\n" /* else store conditional */
"bne- 1b\n" /* retry if lost reservation */
"isync\n"
"stwcx. %2,0,%1\n" /* else store conditional */
"bne- 1b\n" /* retry if lost reservation */
"isync\n"
- : "=&r"(result)
,
+ : "=&r"(result)
: "r"(addr), "r"(val)
: "memory", "cc");
: "r"(addr), "r"(val)
: "memory", "cc");
@@
-67,7
+75,7
@@
unsigned long atomic_exchange_64(volatile unsigned long *addr,
"stdcx. %2,0,%1\n" /* else store conditional */
"bne- 1b\n" /* retry if lost reservation */
"isync\n"
"stdcx. %2,0,%1\n" /* else store conditional */
"bne- 1b\n" /* retry if lost reservation */
"isync\n"
- : "=&r"(result)
,
+ : "=&r"(result)
: "r"(addr), "r"(val)
: "memory", "cc");
: "r"(addr), "r"(val)
: "memory", "cc");
@@
-91,8
+99,8
@@
unsigned long _atomic_exchange(volatile void *addr, unsigned long val, int len)
return 0;
}
return 0;
}
-#define xchg(addr, v) (__typeof__(*(addr)) _atomic_exchange((addr), (v), \
- sizeof(*(addr)))
)
+#define xchg(addr, v) (__typeof__(*(addr))
)
_atomic_exchange((addr), (v), \
+ sizeof(*(addr)))
#endif /* #ifndef _INCLUDE_API_H */
#endif /* #ifndef _INCLUDE_API_H */
This page took
0.024912 seconds
and
4
git commands to generate.