Search code examples
linux-kernelversionsystem-callsunistd.h

Where are the files necessary to modify when adding a system call to linux-2.6.31


when i search for adding a system call, i get many articles but they seem to be for old versions, it also seems like a trivial process.

But the problem is, the directories that articles suggest does not hold for the version 2.6.31. does anyone know where unistd.h, syscall_table.S and syscalls.h or their corresponding files are?

Thanks in advance.


Solution

  • for unistd.h : $SOURCE_PATH/arch/x86/include/asm/unistd_32.h

    for syscalls.h : $SOURCE_PATH/arch/x86/include/asm/syscalls.h

    for syscall_table_32.h : $SOURCE_PATH/arch/x86/kernel/syscall_table_32.h

    obviously i'm on x86 machine.