Page MenuHomeFreeBSD

sched_getaffinity(3): more compatibility with Linux
ClosedPublic

Authored by kib on Apr 24 2022, 10:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 1, 2:27 PM
Unknown Object (File)
Sat, Mar 29, 8:41 PM
Unknown Object (File)
Wed, Mar 26, 3:05 PM
Unknown Object (File)
Sun, Mar 23, 10:23 PM
Unknown Object (File)
Feb 22 2025, 12:00 AM
Unknown Object (File)
Feb 6 2025, 7:13 PM
Unknown Object (File)
Jan 24 2025, 1:16 PM
Unknown Object (File)
Jan 9 2025, 9:36 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 Not Applicable
Unit
Tests Not Applicable

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