You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: