skanchen 发表于 2003-5-10 13:44:15

求救一个系统调用的问题!!!!!

:oops:

我改好了entry.S和 /asm-i386/unistd.h,并在/kernel/sys.c里加了一个调用,就是把一个数返回。
编译好了,进了新的内核后,我写了:
#include<linux/unistd.h>
_syscall1(int,jerrycall,int,i)
    main()
{
printf("you get :%d\n",jerrycall(100));
}                                                                              

但是我gcc **.c时就报错了:                                                      
diao.c: In function `jerrycall':
diao.c:2: `__NR_jerrycall' undeclared (first use in this function)
diao.c:2: (Each undeclared identifier is reported only once
diao.c:2: for each function it appears in.)
那位高手指教一下??
~
~                                                                              
~

jackzheng2002 发表于 2003-5-10 14:31:10

可能是某个头文件没有包含
可以去查查

Dragonfly 发表于 2003-5-11 01:53:55

define it directly in u c code. use the value u add to kernel.
页: [1]
查看完整版本: 求救一个系统调用的问题!!!!!