Commit 7cdc6a8e authored by David Mosberger's avatar David Mosberger

ia64: Patch by Andreas Schwab: The read_lock and read_unlock macros

should not use such innocent variable names like tmp because they
have a high probability to clash with (part of) the argument.
parent 556ad142
...@@ -82,7 +82,7 @@ typedef struct { ...@@ -82,7 +82,7 @@ typedef struct {
#define _raw_read_lock(rw) \ #define _raw_read_lock(rw) \
do { \ do { \
int tmp = 0; \ int __read_lock_tmp = 0; \
__asm__ __volatile__ ("1:\tfetchadd4.acq %0 = [%1], 1\n" \ __asm__ __volatile__ ("1:\tfetchadd4.acq %0 = [%1], 1\n" \
";;\n" \ ";;\n" \
"tbit.nz p6,p0 = %0, 31\n" \ "tbit.nz p6,p0 = %0, 31\n" \
...@@ -97,15 +97,15 @@ do { \ ...@@ -97,15 +97,15 @@ do { \
"br.cond.sptk.few 1b\n" \ "br.cond.sptk.few 1b\n" \
";;\n" \ ";;\n" \
".previous\n" \ ".previous\n" \
: "=&r" (tmp) \ : "=&r" (__read_lock_tmp) \
: "r" (rw) : "p6", "memory"); \ : "r" (rw) : "p6", "memory"); \
} while(0) } while(0)
#define _raw_read_unlock(rw) \ #define _raw_read_unlock(rw) \
do { \ do { \
int tmp = 0; \ int __read_unlock_tmp = 0; \
__asm__ __volatile__ ("fetchadd4.rel %0 = [%1], -1\n" \ __asm__ __volatile__ ("fetchadd4.rel %0 = [%1], -1\n" \
: "=r" (tmp) \ : "=r" (__read_unlock_tmp) \
: "r" (rw) \ : "r" (rw) \
: "memory"); \ : "memory"); \
} while(0) } while(0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment