Add a way to call syscall by number (as opposed to Sysno)
Please, add a variant of syscalls::raw_syscall, which allows calling syscall by raw number as opposed to Sysno.
Why this is needed? Let's assume at some point of the future this crates will stop updating. And I will want to call some syscall, which is not added to Sysno. Attempting to craft fake Sysno instance (using transmute or something) is undefined behavior. So I need a way to call syscall by number
I can see how having a way to call a syscall with a raw integer can be useful not just because of the maintenance aspect.
To avoid code duplication, I think the best way to implement this is as follows:
- Change all
syscalls::syscall::syscall[0-6]to take ausizeinstead ofSysno. - Rename those to
syscalls::syscall::raw_syscall[0-6]. - Add
syscalls::syscall[0-6]which just call the raw architecture-specificraw_syscall[0-6]. - Change the
raw_syscall!()macro to do anas usizeconversion on the first argument and call the newraw_syscall*functions instead. I think this is backwards compatible, but I'm not 100% sure.
Happy to take a pull request for this. I don't have much time to dedicate to this library these days.