You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
syscall/实验步骤.txt

12 lines
703 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

1、有系统调用表的 我们先去把系统调用表中调用号给 增加了表项中的调用号是在一个是虚拟机中的/usr/include/unistd.h
extern int sys_test();
在中断向量表fn_ptr sys_call_table[]中也要添加,顺序要对应。
2、在system_call.s中修改系统调用的个数nr_system_calls,使其增加4。
nr_system_calls = 89
3、在unistd.h中增加系统调用号。
#define__NR_iam
4、创建一个wulq.c 文件在kernal目录下然后在该文件中实现四个系统调用函数。
5、修改kernel目录下的makefile 文件在objs中加入who.o并添加生成who.s、who.o的依赖规则。
6、make all 编译内核
7、测试文件。