by andy_threos_io · 5y ago · 0 comments
Just write the wrapper as a C extension module, and in the module make the system call with proper library call.
like in the following code:
https://github.com/torvalds/linux/blob/master/samples/vfs/te...
This way it will be portable!
A couple of weeks ago, I just made for our OS's system calls. It's only a first draft, but works fine.
You could also parse the C header for constant values.
(Actually, I wrote a python script to generate the C extension for the system calls also, not just for the constants)
No comments yet.