Skip to content

Commit

Permalink
x86: hide cond_syscall behind __KERNEL__
Browse files Browse the repository at this point in the history
This brings x86_64 into line with all other architectures by only defining
cond_syscall() when __KERNEL__ is defined.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Mike Frysinger authored and Thomas Gleixner committed Oct 17, 2007
1 parent 96d5535 commit 6704ab1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/asm-x86/unistd_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -676,12 +676,14 @@ asmlinkage long sys_rt_sigaction(int sig,
#endif /* __KERNEL__ */
#endif /* __NO_STUBS */

#ifdef __KERNEL__
/*
* "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 /* __KERNEL__ */

#endif /* _ASM_X86_64_UNISTD_H_ */

0 comments on commit 6704ab1

Please sign in to comment.