lkml.org 
[lkml]   [2009]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] add NR_syscalls define for x86
On Mon, Aug 24, 2009 at 05:40:14PM -0400, Jason Baron wrote:
> Add a NR_syscalls #define for x86. This is used in the syscall events tracing
> code. Todo: make it dynamic like x86_64
>
> Signed-off-by: Jason Baron <jbaron@redhat.com>
>
>
> ---
> arch/x86/include/asm/unistd_32.h | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/include/asm/unistd_32.h b/arch/x86/include/asm/unistd_32.h
> index 732a307..8deaada 100644
> --- a/arch/x86/include/asm/unistd_32.h
> +++ b/arch/x86/include/asm/unistd_32.h
> @@ -345,6 +345,8 @@
>
> #ifdef __KERNEL__
>
> +#define NR_syscalls 337
> +
Syscalls start at 0 and end at 337, there are 338 syscalls, not 337.
Hence the off-by-1 that I initially reported. NR_syscalls is always the
last syscall + 1.


\
 
 \ /
  Last update: 2009-08-25 00:07    [W:0.110 / U:0.144 seconds]
©2003-2014 Jasper Spaans. Advertise on this site