system call 實做的方式? - BBS
By Joseph
at 2005-10-05T07:22
at 2005-10-05T07:22
Table of Contents
hi,
請問一下
我現在要寫一個 system call 如下 (under FreeBSD 5.4)
syscalls.master:
445 STD { int syshello(char *buf); }
之後執行 makesyscalls.sh
sys_hello.c:
int syshello(struct thread *td,struct syshello_args *uap)
{
printf(usp->buf);
td->td_retval[0]=0;
return 0;
}
那請問一下
我需要include 哪些檔? 因為他都說 prototype not declare
以及如果我想呼叫一些,例如 printf, fopen 等等
又該 include 哪些 header file?
還有是否還要去改那複雜的 Makefile 呢?
--
請問一下
我現在要寫一個 system call 如下 (under FreeBSD 5.4)
syscalls.master:
445 STD { int syshello(char *buf); }
之後執行 makesyscalls.sh
sys_hello.c:
int syshello(struct thread *td,struct syshello_args *uap)
{
printf(usp->buf);
td->td_retval[0]=0;
return 0;
}
那請問一下
我需要include 哪些檔? 因為他都說 prototype not declare
以及如果我想呼叫一些,例如 printf, fopen 等等
又該 include 哪些 header file?
還有是否還要去改那複雜的 Makefile 呢?
--
Tags:
BBS
All Comments
Related Posts
請問可否自行修改 /etc/master.passwd
By Erin
at 2005-10-05T01:11
at 2005-10-05T01:11
Re: gcin怎麼使用無蝦米丫??
By Heather
at 2005-10-05T01:03
at 2005-10-05T01:03
Re: gcin怎麼使用無蝦米丫??
By Jacky
at 2005-10-05T00:33
at 2005-10-05T00:33
Re: gcin怎麼使用無蝦米丫??
By Jacky
at 2005-10-05T00:31
at 2005-10-05T00:31
Re: gcin怎麼使用無蝦米丫??
By Daniel
at 2005-10-05T00:18
at 2005-10-05T00:18