nix icon indicating copy to clipboard operation
nix copied to clipboard

Adding implementations for sched_(set|get)attr

Open YJDoc2 opened this issue 1 year ago • 3 comments
trafficstars

Hello, would the library be accepting implementations for sched_(set|get)attr functions? as per libc crate (and man pages) here , because these two are not exposed by glibc, libc crate will not be supporting these. Is is possible for nix to provide wrapper over them, or does nix only provides wrappers for stuff accepted over libc?

I'd like to contribute the implementations if they are acceptable. Thank you!

YJDoc2 avatar Jan 17 '24 08:01 YJDoc2

We generally don't like raw syscalls since they are inherently unsafe, but we indeed have some interfaces that directly use syscalls in Nix, so it should be fine.

A rough search didn't show me that there is a well-maintained crate that has these interfaces exposed, then I guess we would accept them:)

SteveLauC avatar Jan 17 '24 09:01 SteveLauC

A rough search didn't show me that there is a well-maintained crate that has these interfaces exposed

Yes, that was one of the reason I asked!

I haven't contributed to nix yet, so I'll try to add it according to the contrib-guidelines, and open a PR, asking help there. Thanks!

YJDoc2 avatar Jan 17 '24 09:01 YJDoc2

CONVENTIONS.md has some typical patterns that we use while creating wrappers, you can have a look. If you don't know how to start, take a look at the existing interfaces, there are a lot of them you can refer to

SteveLauC avatar Jan 17 '24 09:01 SteveLauC