]> git.hungrycats.org Git - linux/commitdiff
[ALPHA] Use raw asm instead of attributes for cond_syscall.
authorRichard Henderson <rth@heffalump.twiddle.home>
Sat, 3 Apr 2004 03:54:51 +0000 (19:54 -0800)
committerRichard Henderson <rth@heffalump.twiddle.home>
Sat, 3 Apr 2004 03:54:51 +0000 (19:54 -0800)
include/asm-alpha/unistd.h

index 8ad07504b944a03d35b729d572c96698d4273363..532830bec88370bc6c9934128bf91116c720ebbc 100644 (file)
@@ -616,16 +616,16 @@ asmlinkage long sys_rt_sigaction(int sig,
 
 #endif /* __KERNEL_SYSCALLS__ */
 
-/*
- * "Conditional" syscalls
- *
- * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
- * but it doesn't work on all toolchains, so we just do it by hand.
- *
- * Note that we do *not* provide a parameter list to avoid 
- * conflicting with one of the syscall declarations in some
- * of the relevant header files (including this one).
- */
-#define cond_syscall(x) asmlinkage long x() __attribute__((weak,alias("sys_ni_syscall")));
+/* "Conditional" syscalls.  What we want is
+
+       __attribute__((weak,alias("sys_ni_syscall")))
+
+   but that raises the problem of what type to give the symbol.  If we use
+   a prototype, it'll conflict with the definition given in this file and
+   others.  If we use __typeof, we discover that not all symbols actually
+   have declarations.  If we use no prototype, then we get warnings from
+   -Wstrict-prototypes.  Ho hum.  */
+
+#define cond_syscall(x)  asm(".weak\t" #x "\n" #x " = sys_ni_syscall");
 
 #endif /* _ALPHA_UNISTD_H */