All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daiki Matsuda <dyky@df-usa.com>
To: linux-kernel@vger.kernel.org
Subject: 2.2.18 asm-alpha/system.h has a problem
Date: Sun, 17 Dec 2000 15:34:44 -0800	[thread overview]
Message-ID: <20001217153444N.dyky@df-usa.com> (raw)

[-- 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)						 \

             reply	other threads:[~2000-12-18  0:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-17 23:34 Daiki Matsuda [this message]
2000-12-18  9:31 ` 2.2.18 asm-alpha/system.h has a problem 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20001217153444N.dyky@df-usa.com \
    --to=dyky@df-usa.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.