Skip to content
This repository has been archived by the owner on Dec 9, 2018. It is now read-only.

Generate syscalls ? #38

Open
arnaud-lb opened this issue Jan 15, 2017 · 1 comment
Open

Generate syscalls ? #38

arnaud-lb opened this issue Jan 15, 2017 · 1 comment

Comments

@arnaud-lb
Copy link

Awesome project!

Golang took the same approach, partly for the same reasons. I believe that some of the Golang work / ideas could be reused here.

What they do is to generate simple functions that do nothing but calling syscall() with the right syscall number and arguments (example). Then these functions are used in the standard library.

Generation is done by the mksyscall.pl script. It takes an input file like this one, and generates this.

Syscall number constants are also generated by a script.

@japaric
Copy link
Owner

japaric commented Jan 15, 2017

Awesome project!

Thanks.

We are doing something similar but not generating everything "all the way down". The system call numbers have all been automatically generated but the thin syscall wrappers (thinner than go's -- they only add type checking to the "untyped" syscall! macro; they don't any conversion) are being manually written. It would be great to generate those too from the Linux source or something!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants