If I am creating a new Linux system call , does that need changes in libc
as well?
Asked
Active
Viewed 32 times
-2

Franc
- 319
- 9
- 28
1 Answers
1
If you want a libc wrapper, then you probably need to update libc (which can be a pain). Thankfully, libc includes syscall(2)
which can be used for any arbitrary system call.
The only catch is that the programmer is now responsible for making sure invocations of this system call use the correct arguments since the compiler will only check the type of the first argument. For this reason, you should implement your own system call wrapper that includes types.

Sagar
- 1,617
- 9
- 17