Page MenuHomeFreeBSD

sched_getaffinity(3): more compatibility with Linux
ClosedPublic

Authored by kib on Apr 24 2022, 10:13 PM.
Tags
None
Referenced Files
F105306931: D35045.id105377.diff
Sat, Dec 14, 5:56 PM
F105295254: D35045.diff
Sat, Dec 14, 2:43 PM
F105253687: D35045.id105399.diff
Sat, Dec 14, 2:35 AM
Unknown Object (File)
Thu, Dec 5, 4:42 PM
Unknown Object (File)
Mon, Nov 25, 5:36 PM
Unknown Object (File)
Oct 20 2024, 4:16 AM
Unknown Object (File)
Oct 6 2024, 6:21 AM
Unknown Object (File)
Sep 28 2024, 3:30 PM
Subscribers

Details

Summary

Report EINVAL instead of EDEADLK when impossible cpu mask is set.

Noted by: dchagin

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

btw, glibc defines CPU_SETSIZE as 1024 https://sourceware.org/git/?p=glibc.git;a=blob;f=posix/bits/cpu-set.h;h=afc1622f7ea4063ea1bd84e20d491d72e378376c;hb=refs/heads/master
so if the storage for cpu_set_t is not allocated by CPU_ALLOC with count = 256 our sched_setaffinity should fails

This revision is now accepted and ready to land.Apr 25 2022, 7:01 AM
lib/libc/gen/sched_setaffinity.c
49

Don't we have to check and set errno, not error?

This revision now requires review to proceed.Apr 25 2022, 1:22 PM
kib marked an inline comment as done.Apr 25 2022, 1:22 PM
This revision is now accepted and ready to land.Apr 25 2022, 1:25 PM