system call 實做的方式? - BBS

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 呢?

--

All Comments