Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically generate system call tables #260

Closed
glommer opened this issue Apr 9, 2014 · 3 comments
Closed

Automatically generate system call tables #260

glommer opened this issue Apr 9, 2014 · 3 comments

Comments

@glommer
Copy link
Contributor

glommer commented Apr 9, 2014

There are some programs that insist on calling syscall() directly, and when it happens, we need to go and implement always the same boilerplate:

A case in a switch that interprets the arguments, and passes them to a symbol. Because we always have the functionality implemented as a standard symbol, it can't get too distant from this.

This code is massive and repetitive, and will always force us to wait for a missing syscall to appear, so we can go and do monkey work for a new one. There has to be a better way, in which we just mark a particular symbol.

For example:

int write(....) {
[...]
}
SYSCALL(__NR_write, write);

Or even:

int SYSCALL(__NR_write, write)(...) {
[...]
}

A computer should be generating that code, not us.

@wkozaczuk
Copy link
Collaborator

Is this already how it is done in linux.cc using the SYSCALLx macros?

@wkozaczuk
Copy link
Collaborator

Is this issue obsolete?

@glommer
Copy link
Contributor Author

glommer commented Jun 15, 2018

I don't really look at this code for many years. It is possible that it is already there. I'll just close it for now.

@glommer glommer closed this as completed Jun 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants