public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.2.18 asm-alpha/system.h has a problem
@ 2000-12-17 23:34 Daiki Matsuda
  2000-12-18  9:31 ` Peter Samuelson
  0 siblings, 1 reply; 10+ messages in thread
From: Daiki Matsuda @ 2000-12-17 23:34 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: Text/Plain, Size: 288 bytes --]

Hi, all.

I encounterd the problem that 'cdrdao' is not compilable in 2.2.18 on
Alpha. And I researched a little.
So, then new code added in include/asm-alpha/system.h on 2.2.18 has a
problem in C++. The 'new' may be the reserved word in C++. And I send
its patch.

Regards
Daiki Matsuda

[-- Attachment #2: asm-alpha.system.h.patch --]
[-- Type: Text/Plain, Size: 1625 bytes --]

--- linux/include/asm-alpha/system.h.old	Sun Dec 17 17:53:28 2000
+++ linux/include/asm-alpha/system.h	Sun Dec 17 17:54:51 2000
@@ -390,7 +390,7 @@
 #define __HAVE_ARCH_CMPXCHG 1
 
 extern __inline__ unsigned long
-__cmpxchg_u32(volatile int *m, int old, int new)
+__cmpxchg_u32(volatile int *m, int old_val, int new_val)
 {
 	unsigned long prev, cmp;
 
@@ -409,13 +409,13 @@
 	"3:	br 1b\n"
 	".previous"
 	: "=&r"(prev), "=&r"(cmp), "=m"(*m)
-	: "r"((long) old), "r"(new), "m"(*m) : "memory");
+	: "r"((long) old_val), "r"(new_val), "m"(*m) : "memory");
 
 	return prev;
 }
 
 extern __inline__ unsigned long
-__cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new)
+__cmpxchg_u64(volatile long *m, unsigned long old_val, unsigned long new_val)
 {
 	unsigned long prev, cmp;
 
@@ -434,7 +434,7 @@
 	"3:	br 1b\n"
 	".previous"
 	: "=&r"(prev), "=&r"(cmp), "=m"(*m)
-	: "r"((long) old), "r"(new), "m"(*m) : "memory");
+	: "r"((long) old_val), "r"(new_val), "m"(*m) : "memory");
 
 	return prev;
 }
@@ -444,16 +444,16 @@
 extern void __cmpxchg_called_with_bad_pointer(void);
 
 static __inline__ unsigned long
-__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
+__cmpxchg(volatile void *ptr, unsigned long old_val, unsigned long new_val, int size)
 {
 	switch (size) {
 		case 4:
-			return __cmpxchg_u32(ptr, old, new);
+			return __cmpxchg_u32(ptr, old_val, new_val);
 		case 8:
-			return __cmpxchg_u64(ptr, old, new);
+			return __cmpxchg_u64(ptr, old_val, new_val);
 	}
 	__cmpxchg_called_with_bad_pointer();
-	return old;
+	return old_val;
 }
 
 #define cmpxchg(ptr,o,n)						 \

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2000-12-18 18:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-17 23:34 2.2.18 asm-alpha/system.h has a problem Daiki Matsuda
2000-12-18  9:31 ` Peter Samuelson
2000-12-18 14:49   ` Andrea Arcangeli
2000-12-18 15:03     ` Peter Samuelson
2000-12-18 15:14       ` Andrea Arcangeli
2000-12-18 15:24         ` Peter Samuelson
2000-12-18 15:41           ` Andrea Arcangeli
2000-12-18 18:15     ` Timur Tabi
2000-12-18 18:20       ` Miquel van Smoorenburg
2000-12-18 18:20       ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox