Linux进程调用线程,并在进程输出结果
添加系统调用
- 进入
/arch/x86/entry/syscalls/syscall_64
- 添加441的系统调用
添加进程和线程代码
- 进入
/arch/x86/kernel/sys_x86_64.c
,并添加完成变量以及素数运算
- 进入内核根目录
1 |
添加调用代码
- 编写
mysysCall_2.c
- 编译
1 | # gcc mysysCall_2.c -static -o mysysCall |
启动内核测试
- 运行
./mysysCall
If you like this blog or find it useful for you, you are welcome to comment on it. You are also welcome to share this blog, so that more people can participate in it. If the images used in the blog infringe your copyright, please contact the author to delete them. Thank you !