Module: xenomai-jki Branch: queues/assorted Commit: 9e9c8dcadee420404e3b9466b77755b105b4347e URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=9e9c8dcadee420404e3b9466b77755b105b4347e
Author: Jan Kiszka <jan.kis...@siemens.com> Date: Fri Mar 5 18:27:07 2010 +0100 Add __xn_linux_mux_p for Linux syscall demultiplexing Signed-off-by: Jan Kiszka <jan.kis...@siemens.com> --- include/asm-arm/syscall.h | 8 ++++++-- include/asm-blackfin/syscall.h | 2 ++ include/asm-nios2/syscall.h | 2 ++ include/asm-powerpc/syscall.h | 2 ++ include/asm-x86/syscall.h | 1 + 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/asm-arm/syscall.h b/include/asm-arm/syscall.h index fb512b4..39311d5 100644 --- a/include/asm-arm/syscall.h +++ b/include/asm-arm/syscall.h @@ -55,9 +55,13 @@ #ifdef CONFIG_OABI_COMPAT #define __xn_reg_mux_p(regs) ( ((regs)->ARM_r7 == __NR_OABI_SYSCALL_BASE + XENO_ARM_SYSCALL) || \ ((regs)->ARM_r7 == __NR_SYSCALL_BASE + XENO_ARM_SYSCALL) ) -#else +#define __xn_linux_mux_p(regs, nr) \ + ( ((regs)->ARM_r7 == __NR_OABI_SYSCALL_BASE + (nr)) || \ + ((regs)->ARM_r7 == __NR_SYSCALL_BASE + (nr)) ) +#else /* !CONFIG_OABI_COMPAT */ #define __xn_reg_mux_p(regs) ((regs)->ARM_r7 == __NR_SYSCALL_BASE + XENO_ARM_SYSCALL) -#endif +#define __xn_linux_mux_p(regs, nr) ((regs)->ARM_r7 == __NR_SYSCALL_BASE + (nr)) +#endif /* !CONFIG_OABI_COMPAT */ #define __xn_mux_id(regs) ((__xn_reg_mux(regs) >> 16) & 0xff) #define __xn_mux_op(regs) ((__xn_reg_mux(regs) >> 24) & 0xff) diff --git a/include/asm-blackfin/syscall.h b/include/asm-blackfin/syscall.h index 9f90611..9420dc8 100644 --- a/include/asm-blackfin/syscall.h +++ b/include/asm-blackfin/syscall.h @@ -55,6 +55,8 @@ #define __xn_mux_id(regs) ((__xn_reg_mux(regs) >> 24) & 0xff) #define __xn_mux_op(regs) ((__xn_reg_mux(regs) >> 16) & 0xff) +#define __xn_linux_mux_p(regs, nr) (__xn_reg_mux(regs) == (nr)) + /* Purposedly used inlines and not macros for the following routines so that we don't risk spurious side-effects on the value arg. */ diff --git a/include/asm-nios2/syscall.h b/include/asm-nios2/syscall.h index 6dd81cb..8fd53dc 100644 --- a/include/asm-nios2/syscall.h +++ b/include/asm-nios2/syscall.h @@ -48,6 +48,8 @@ #define __xn_mux_id(regs) ((__xn_reg_mux(regs) >> 24) & 0xff) #define __xn_mux_op(regs) ((__xn_reg_mux(regs) >> 16) & 0xff) +#define __xn_linux_mux_p(regs, nr) (__xn_reg_mux(regs) == (nr)) + /* * Purposedly used inlines and not macros for the following routines * so that we don't risk spurious side-effects on the value arg. diff --git a/include/asm-powerpc/syscall.h b/include/asm-powerpc/syscall.h index 6db8667..99cb9ad 100644 --- a/include/asm-powerpc/syscall.h +++ b/include/asm-powerpc/syscall.h @@ -49,6 +49,8 @@ #define __xn_mux_id(regs) ((__xn_reg_mux(regs) >> 16) & 0xff) #define __xn_mux_op(regs) ((__xn_reg_mux(regs) >> 24) & 0xff) +#define __xn_linux_mux_p(regs, nr) (__xn_reg_mux(regs) == (nr)) + /* Purposedly used inlines and not macros for the following routines so that we don't risk spurious side-effects on the value arg. */ diff --git a/include/asm-x86/syscall.h b/include/asm-x86/syscall.h index f77fd55..36dcd59 100644 --- a/include/asm-x86/syscall.h +++ b/include/asm-x86/syscall.h @@ -77,6 +77,7 @@ struct frame { #define __xn_mux_id(regs) ((__xn_reg_mux(regs) >> 16) & 0xff) #define __xn_mux_op(regs) ((__xn_reg_mux(regs) >> 24) & 0xff) +#define __xn_linux_mux_p(regs, nr) (__xn_reg_mux(regs) == (nr)) /* Purposedly used inlines and not macros for the following routines so that we don't risk spurious side-effects on the value arg. */ _______________________________________________ Xenomai-git mailing list Xenomai-git@gna.org https://mail.gna.org/listinfo/xenomai-git