Linux process call thread

Using process call thread and show result back to process

Posted by MichaelChen on 2020-12-03
Estimated Reading Time 1 Minutes
Words 103 In Total
Viewed Times

Linux进程调用线程,并在进程输出结果

添加系统调用

  • 进入/arch/x86/entry/syscalls/syscall_64

2020-12-0320-05-52

  • 添加441的系统调用

2020-12-0320-06-41

添加进程和线程代码

  • 进入/arch/x86/kernel/sys_x86_64.c,并添加完成变量以及素数运算

2020-12-0320-39-09

  • 进入内核根目录
1
# make -j8

添加调用代码

  • 编写mysysCall_2.c

2020-12-0320-07-48

  • 编译
1
# gcc mysysCall_2.c -static -o mysysCall

启动内核测试

  • 运行./mysysCall

2020-12-0320-39-59


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 !