Page MenuHomeFreeBSD

cpuset: Add compat shim to the sched_affinity functions
ClosedPublic

Authored by dchagin on Feb 13 2023, 11:40 AM.
Tags
None
Referenced Files
F143807990: D38555.id117281.diff
Sat, Jan 31, 2:41 PM
F143772936: D38555.id117192.diff
Sat, Jan 31, 12:25 PM
Unknown Object (File)
Sat, Jan 31, 3:16 AM
Unknown Object (File)
Fri, Jan 30, 8:24 PM
Unknown Object (File)
Sun, Jan 25, 9:15 AM
Unknown Object (File)
Sun, Jan 18, 11:29 AM
Unknown Object (File)
Tue, Jan 13, 2:16 PM
Unknown Object (File)
Dec 31 2025, 4:09 AM
Subscribers

Details

Summary

To allow to run a new world on the pre 1400079 kernel a compat shims to
the sched_affinity functions has beed added. PID_MAX is hardcoded as our
kernel does not expose it to the user space.

Reported by: antoine
Tested by: antoine

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 49729
Build 46619: arc lint + arc unit

Event Timeline

dchagin added a reviewer: kib.
lib/libc/gen/sched_getaffinity.c
35

Look at sys/param.h P_OSREL_XXX macros.

dchagin edited the summary of this revision. (Show Details)

better (beauty) naming, thanks)

better (beauty) naming, thanks)

Um, I mean that you should add your P_OSREL value to sys/param.h

In D38555#877827, @kib wrote:

better (beauty) naming, thanks)

Um, I mean that you should add your P_OSREL value to sys/param.h

sure? P_OSREL is under _KERNEL, thats why I do not do it

lib/libc/gen/sched_getaffinity.c
35

I would move this definition into libc_private.h, and add a comment explaining why we hardcode the value there.

done, may be put _PID_MAX under _WANT_P_OSREL condition?

done, may be put _PID_MAX under _WANT_P_OSREL condition?

No, they are unrelated.

lib/libc/include/libc_private.h
47 ↗(On Diff #117281)

Add a blank line before this comment.

This revision is now accepted and ready to land.Feb 15 2023, 9:17 AM