-   Programming (
-   -   Calling a system call from a system call? (

Loc_8 09-16-2006 04:21 PM

Calling a system call from a system call?
Is it legal to call a newly defined system call from within another system call (say, vfs_read in /fs/read_write.c for example)?

If so, what do I need to include in read_write.c? A test program in user-space defined the following:


#include <ctype.h>
#include <errno.h>
#include "linux-2.6.16/include/asm-i386/unistd.h" // < modified

_syscall2(int, testCall, int, arg01, int, arg02)
...and I was able to use testCall. However, modifying read_write.c with the above lines added complains about "kernel_errno" being undeclared.

(btw, I'm just playing around with the kernel here; I don't expect to be messing with the system calls in a real program)

Any help is greatly appreciated, thanks.

All times are GMT -5. The time now is 03:54 AM.