-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Milestone
Description
This is a tracking issue for the status of linux-api/unistd.rs.
Why is this required?
Unistd.h mappings are required for a stable(!!) release of linux-api-sys and the implementation of the syscall function.
Why do you need the syscall function?
- I will have the ability to remove all named bindings to system calls, and instead provide a safe wrapper. A small dependency on linux-api-sys isn't optimal, but it will make it easier for other developers
- Some system calls, such as
gettid()have no libc wrapper; They can't be called from Rust as-is. Instead, I will do something like the following:
pub fn get_current_thread_id() -> ::pid_t {
unsafe {
::syscall(call_id: ::NR_gettid) as ::pid_t //TODO Check this to see if it works in production
}
}This will be able to be used without any unsafe blocks in regular code. Please note that it is just a prototype and has not actually been implemented yet, so it may change.
Tracking section
Implementations
- asm_generic
- alpha
- arm
- avr32
- blackfin
- cris
- frv
- ia64
- m32r
- m68k
- microblaze
- mips
- m10300
- parisc
- powerpc
- s390
- sh (May be dropped)
- sparc
- x86
- x86-64
Minor extensions to asm_generic
- arc
- c6x
- metag
- nios2
- openrisc
- tile
Reactions are currently unavailable