diff options
author | Mark Geisert <mark@maxrnd.com> | 2025-03-18 00:53:57 -0700 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2025-03-18 10:26:40 +0100 |
commit | a7d7b9e32f8743b818cbe97dd06f3f16703c671b (patch) | |
tree | 910adb53d45b5c035f0c1a5b1ae89fa74ac4b2f3 /newlib/libc/stdlib/strtorx.c | |
parent | f74dc93c6359d7821db4166cf03a3748983d721b (diff) | |
download | newlib-a7d7b9e32f8743b818cbe97dd06f3f16703c671b.zip newlib-a7d7b9e32f8743b818cbe97dd06f3f16703c671b.tar.gz newlib-a7d7b9e32f8743b818cbe97dd06f3f16703c671b.tar.bz2 |
Cygwin: Carry process affinity through to result
Due to deficient testing, the current code doesn't return a valid result
to users of sched_getaffinity(). The updated code carries the determined
procmask through to the generation of result cpu mask.
Recognize Windows' limitation that if the process is multi-group (i.e.,
has threads in multiple cpu groups) there is no visibility to which
processors in other groups are being used. One could remedy this by
looping through all the process' threads, but that could be expensive
so is left for future contemplation. In addition, we'd have to maintain
our own copy of each thread's current group and mask in internal overhead.
(By the way, multi-group processes are only possible on Windows systems
with more than 64 hardware threads.)
Reported-by: Christian Franke <Christian.Franke@t-online.de>
Addresses: https://cygwin.com/pipermail/cygwin/2025-March/257616.html
Signed-off-by: Mark Geisert <mark@maxrnd.com>
Fixes: 641ecb07533e ("Cygwin: Implement sched_[gs]etaffinity()")
Diffstat (limited to 'newlib/libc/stdlib/strtorx.c')
0 files changed, 0 insertions, 0 deletions