-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Feat(Linux): Add new process flags #4174
Conversation
The error in https://github.com/rust-lang/libc/actions/runs/12201653969/job/34040533674?pr=4174 seems unrelated to my changes, no? |
The changes look good to me but could you update
Indeed, looks like a new lint was added. If you're up to it feel free to add a patch with: #[allow(unpredictable_function_pointer_comparisons)] // FIXME(msrv): stabilized in 1.85 Otherwise I'll get it at some point before merging this. @rustbot label +stable-nominated |
Fyi I have a fix for the lint in progress #4177 |
👍
I wanted to as well, but couldn't see any of the previous
Can do!
I see that, thanks! I'll rebase on top of it once merged. |
I can't think of any reason so I would just put them all there, I guess if it causes CI to fail for some reason then I'll change my answer :) thanks for offering. |
`PF_BLOCK_TS` and `PF_SUSPEND_TASK`. They are also added to the tests. Interestingly, `PF_SUSPEND_TASK` is already there somewhere in the build script 🤔 Signed-off-by: Paul Mabileau <[email protected]>
Taken from <https://github.com/torvalds/linux/blob/2ba9f676d0a2e408aef14d679984c26373bf37b7/include/linux/sched.h#L1661\>. Signed-off-by: Paul Mabileau <[email protected]>
They didn't seem to already exist, so add them. The new ones are included. Signed-off-by: Paul Mabileau <[email protected]>
7ac04b2
to
5997f35
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the changes!
Cool, thanks! |
`PF_BLOCK_TS` and `PF_SUSPEND_TASK`. They are also added to the tests. Interestingly, `PF_SUSPEND_TASK` is already there somewhere in the build script 🤔 Signed-off-by: Paul Mabileau <[email protected]> (backport <rust-lang#4174>) (cherry picked from commit 6934e52)
Taken from <https://github.com/torvalds/linux/blob/2ba9f676d0a2e408aef14d679984c26373bf37b7/include/linux/sched.h#L1661\>. Signed-off-by: Paul Mabileau <[email protected]> (backport <rust-lang#4174>) (cherry picked from commit 9a38ea3)
They didn't seem to already exist, so add them. The new ones are included. Signed-off-by: Paul Mabileau <[email protected]> (backport <rust-lang#4174>) (cherry picked from commit 5997f35)
Description
This adds two new/missing
PF_*
task flags to the Linux-like platform module:PF_BLOCK_TS
that was added relatively recently, in 6.9;PF_SUSPEND_TASK
that has been there for a bit more time: 3.11;This would be for fanotify consumption. It should be easily backportable to 0.2.
Sources
https://github.com/torvalds/linux/blob/2ba9f676d0a2e408aef14d679984c26373bf37b7/include/linux/sched.h#L1661
Checklist
libc-test/semver
have been updated*LAST
or*MAX
areincluded (see #3131)
cd libc-test && cargo test --target mytarget
);especially relevant for platforms that may not be checked in CI