From 5b1e894e6a0bbefc389933366f6adffbf2e096a0 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Tue, 9 Apr 2002 13:58:44 +1000 Subject: Make cond_syscall per arch. This is required on some architectures (eg ppc64) where foo points to a function descriptor and .foo is the address of the actual function. --- include/asm-sparc/unistd.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/asm-sparc') diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h index 5ef9d7c3a70d..3f131fd488e9 100644 --- a/include/asm-sparc/unistd.h +++ b/include/asm-sparc/unistd.h @@ -437,4 +437,12 @@ static __inline__ pid_t wait(int * wait_stat) #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 + */ +#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall"); + #endif /* _SPARC_UNISTD_H */ -- cgit v1.2.3