projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow taking address of rcu_read_lock() and rcu_read_unlock()
[urcu.git]
/
urcu
/
uatomic_arch_ppc.h
diff --git
a/urcu/uatomic_arch_ppc.h
b/urcu/uatomic_arch_ppc.h
index 39c4c2400113555519d8b3ce37d6db5cae710e4a..bb74934fb19a279dfe43d7f1785ea89865756193 100644
(file)
--- a/
urcu/uatomic_arch_ppc.h
+++ b/
urcu/uatomic_arch_ppc.h
@@
-27,24
+27,12
@@
extern "C" {
#endif
extern "C" {
#endif
-#ifndef __SIZEOF_LONG__
-#ifdef __powerpc64__
-#define __SIZEOF_LONG__ 8
-#else
-#define __SIZEOF_LONG__ 4
-#endif
-#endif
-
#ifdef __NO_LWSYNC__
#define LWSYNC_OPCODE "sync\n"
#else
#define LWSYNC_OPCODE "lwsync\n"
#endif
#ifdef __NO_LWSYNC__
#define LWSYNC_OPCODE "sync\n"
#else
#define LWSYNC_OPCODE "lwsync\n"
#endif
-#ifndef BITS_PER_LONG
-#define BITS_PER_LONG (__SIZEOF_LONG__ * 8)
-#endif
-
#define ILLEGAL_INSTR ".long 0xd00d00"
/*
#define ILLEGAL_INSTR ".long 0xd00d00"
/*
@@
-76,7
+64,7
@@
unsigned long _uatomic_exchange(void *addr, unsigned long val, int len)
return result;
}
return result;
}
-#if (BITS_PER_LONG == 64)
+#if (
CAA_
BITS_PER_LONG == 64)
case 8:
{
unsigned long result;
case 8:
{
unsigned long result;
@@
-118,7
+106,7
@@
unsigned long _uatomic_cmpxchg(void *addr, unsigned long old,
__asm__ __volatile__(
LWSYNC_OPCODE
"1:\t" "lwarx %0,0,%1\n" /* load and reserve */
__asm__ __volatile__(
LWSYNC_OPCODE
"1:\t" "lwarx %0,0,%1\n" /* load and reserve */
- "cmp
d
%0,%3\n" /* if load is not equal to */
+ "cmp
w
%0,%3\n" /* if load is not equal to */
"bne 2f\n" /* old, fail */
"stwcx. %2,0,%1\n" /* else store conditional */
"bne- 1b\n" /* retry if lost reservation */
"bne 2f\n" /* old, fail */
"stwcx. %2,0,%1\n" /* else store conditional */
"bne- 1b\n" /* retry if lost reservation */
@@
-131,7
+119,7
@@
unsigned long _uatomic_cmpxchg(void *addr, unsigned long old,
return old_val;
}
return old_val;
}
-#if (BITS_PER_LONG == 64)
+#if (
CAA_
BITS_PER_LONG == 64)
case 8:
{
unsigned long old_val;
case 8:
{
unsigned long old_val;
@@
-145,7
+133,7
@@
unsigned long _uatomic_cmpxchg(void *addr, unsigned long old,
"bne- 1b\n" /* retry if lost reservation */
"isync\n"
"2:\n"
"bne- 1b\n" /* retry if lost reservation */
"isync\n"
"2:\n"
- : "=&r"(old_val)
,
+ : "=&r"(old_val)
: "r"(addr), "r"((unsigned long)_new),
"r"((unsigned long)old)
: "memory", "cc");
: "r"(addr), "r"((unsigned long)_new),
"r"((unsigned long)old)
: "memory", "cc");
@@
-190,7
+178,7
@@
unsigned long _uatomic_add_return(void *addr, unsigned long val,
return result;
}
return result;
}
-#if (BITS_PER_LONG == 64)
+#if (
CAA_
BITS_PER_LONG == 64)
case 8:
{
unsigned long result;
case 8:
{
unsigned long result;
This page took
0.026439 seconds
and
4
git commands to generate.