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
F103556931: D38555.id117281.diff
Tue, Nov 26, 12:02 PM
Unknown Object (File)
Mon, Nov 18, 12:39 AM
Unknown Object (File)
Mon, Nov 18, 12:33 AM
Unknown Object (File)
Mon, Nov 18, 12:19 AM
Unknown Object (File)
Mon, Nov 18, 12:19 AM
Unknown Object (File)
Tue, Oct 29, 6:26 PM
Unknown Object (File)
Sep 30 2024, 12:47 PM
Unknown Object (File)
Sep 30 2024, 12:47 PM
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