Problem with creating a new system call.

Saurabh Desai (sdesai@ecs.fullerton.edu)
Tue, 14 Oct 1997 17:16:39 -0700 (PDT)


Thanks for your time, pal.

I created a new very simple system call called 'sys_prefetch' that
takes 2 arguments: sys_prefetch(int mode, int nr_hints)
I then made an entry of this new call in "arch/i386/kernel/
entry.S" and in "include/asm/unistd.h"
I then compiled the kernel and tried to call the system call
from a user program by first defining it as :
_syscall2 (int, prefetch, int, mode, int, nr_hints)

Whenever I call this system call, the return value is -1 and when I
check the error message using perror(), the error message is always,
"Bad Address".
I don't know why I get this error. All my variables are defined
and initialized.
Does anybody know what can cause a system call to return to
return "Bad Address" ?
Thanks in advance.
saurabh desai.
<sdesai@titan.fullerton.edu>