Feat(Linux): Add new process flags#4174
Feat(Linux): Add new process flags#4174tgross35 merged 3 commits intorust-lang:mainfrom PaulDance:linux-new-proc-flags
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.85Otherwise 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 <paul.mabileau@harfanglab.fr>
Taken from <https://github.com/torvalds/linux/blob/2ba9f676d0a2e408aef14d679984c26373bf37b7/include/linux/sched.h#L1661\>. Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
They didn't seem to already exist, so add them. The new ones are included. Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
tgross35
left a comment
There was a problem hiding this comment.
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 <paul.mabileau@harfanglab.fr> (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 <paul.mabileau@harfanglab.fr> (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 <paul.mabileau@harfanglab.fr> (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_TSthat was added relatively recently, in 6.9;PF_SUSPEND_TASKthat 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/semverhave been updated*LASTor*MAXareincluded (see #3131)
cd libc-test && cargo test --target mytarget);especially relevant for platforms that may not be checked in CI