Question

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.

Was it helpful?

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.

OTHER TIPS

On most Linux systems such header files can be found under:

/usr/src/kernels/$KERNEL-VERSION/include/linux/

You need to have your kernel sources installed to be able to do any kernel development though, if that's what're trying to do, since unistd.h is part of the standard gcc library as well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top