Kernel System Calls, Synchronization, and OS Concepts
Classified in Computers
Written on in
English with a size of 6.51 KB
Implementing a New System Call in the Kernel
Required Files to Add
- /usr/src/test_kernel/SystemCalls/test_call.c:
- Creates system call pointer.
- Exports the pointer so that the system call module can access it.
- Defines the system call wrapper.
- /usr/src/test_kernel/SystemCalls/Makefile:
obj-y := test_call.o(Compiles files directly into the kernel).
System Module Implementation
- /usr/src/test_kernel/SystemModule/syscallModule.c:
- Holds module code.
- Implements system call behavior.
- Registers system call pointer to the proper system call handler.
- /usr/src/test_kernel/SystemModule/Makefile:
obj-m := syscallmodule.o(Compiles file as a module).
Required Files to Modify
- /usr/src/test_kernel/arch/x86/entry/syscalls/syscall_64.tbl: Add the system call to the table.
- /usr/