ym_monkey
03-24-2002, 09:16 PM
I am trying to implement a new system call. I have made all the necessary entries in both unistd.h and entry.S, and included linkage.h in my local include file, as well as adding _syscallX(.., getval, ..) in the local include file getval.h. However, when I try to invoke the new call from the driver it complains that __NR_getval is undefined in at compile time. The kernel code builds and boots without any errors or warnings. I'm really clueless as to why... Any help would be greatly appreciated.
The system call (actually 2 of them) are very simple. One gets a system global variable,
and the other sets it.
So, the driver has something roughly like this:
#include <getval.h>
#include <setval.h>
int main(){
int variable;
variable = getval();
variable = 5;
setval(5);
variable = getval();
printf("value is: %d\n",variable);
}
Thanks!
The system call (actually 2 of them) are very simple. One gets a system global variable,
and the other sets it.
So, the driver has something roughly like this:
#include <getval.h>
#include <setval.h>
int main(){
int variable;
variable = getval();
variable = 5;
setval(5);
variable = getval();
printf("value is: %d\n",variable);
}
Thanks!