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)
Mon, Nov 10, 6:24 AM
Unknown Object (File)
Fri, Nov 7, 2:31 AM
Unknown Object (File)
Tue, Nov 4, 3:31 AM
Unknown Object (File)
Mon, Nov 3, 2:42 AM
Unknown Object (File)
Mon, Oct 27, 10:18 AM
Unknown Object (File)
Sun, Oct 26, 11:31 PM
Unknown Object (File)
Sat, Oct 25, 9:01 PM
Unknown Object (File)
Thu, Oct 16, 8:36 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