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
F131816243: D38555.id117281.diff
Sat, Oct 11, 10:04 AM
F131816238: D38555.id.diff
Sat, Oct 11, 10:04 AM
F131816236: D38555.id117192.diff
Sat, Oct 11, 10:04 AM
F131816234: D38555.id117188.diff
Sat, Oct 11, 10:04 AM
F131816232: D38555.id117282.diff
Sat, Oct 11, 10:04 AM
F131816225: D38555.id117083.diff
Sat, Oct 11, 10:04 AM
F131790315: D38555.diff
Sat, Oct 11, 4:43 AM
F131777719: D38555.diff
Sat, Oct 11, 2:18 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 49796
Build 46687: arc lint + arc unit

Event Timeline

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

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
37

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

Add a blank line before this comment.

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