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)
Sun, Dec 22, 2:44 AM
Unknown Object (File)
Sun, Dec 15, 11:20 AM
Unknown Object (File)
Sat, Dec 14, 5:56 PM
Unknown Object (File)
Sat, Dec 14, 2:43 PM
Unknown Object (File)
Sat, Dec 14, 2:35 AM
Unknown Object (File)
Dec 5 2024, 4:42 PM
Unknown Object (File)
Nov 25 2024, 5:36 PM
Unknown Object (File)
Oct 20 2024, 4:16 AM
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