QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1010|回复: 2

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

[复制链接]
发表于 2003-5-10 13:44:15 | 显示全部楼层 |阅读模式


我改好了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.)
那位高手指教一下??
~
~                                                                              
~
发表于 2003-5-10 14:31:10 | 显示全部楼层
可能是某个头文件没有包含
可以去查查
回复

使用道具 举报

发表于 2003-5-11 01:53:55 | 显示全部楼层
define it directly in u c code. use the value u add to kernel.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-5-23 13:32 , Processed in 0.067042 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表