Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding implementations for sched_(set|get)attr #2295

Open
YJDoc2 opened this issue Jan 17, 2024 · 3 comments
Open

Adding implementations for sched_(set|get)attr #2295

YJDoc2 opened this issue Jan 17, 2024 · 3 comments

Comments

@YJDoc2
Copy link

YJDoc2 commented Jan 17, 2024

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!

@SteveLauC
Copy link
Member

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:)

@YJDoc2
Copy link
Author

YJDoc2 commented Jan 17, 2024

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!

@SteveLauC
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants