nix-rust / nix

Rust friendly bindings to *nix APIs
MIT License
2.65k stars 666 forks source link

Exposing safe syscalls to leverage the Linux PREEMPT_RT patch (Real Time Linux) #1260

Open reneherrero opened 4 years ago

reneherrero commented 4 years ago

Hi,

I'm trying to leverage the Linux PREEMPT_RT patch with Rust to run some real-time(ish) tasks and found that much of what's needed is absent in this crate.

The closest I was able to find is using unsafe methods in libc as such: https://gist.github.com/reneherrero/0cf788a148a43167d910c5c0109823f6

Here's an example of how you would do it in C: https://wiki.linuxfoundation.org/realtime/documentation/howto/applications/application_base

Should this be in scope here?

Thanks,

asomers-ax commented 4 years ago

Nix's goal is to provide safe wrappers for libc functions. So yes, this would be in scope. We would merge a PR if you provide one.