I was wondering if there was any plan to support the setting/getting
of the affinity of threads.
I tried to understand a little the situation:
Using LinuxThreads one has a pid for each thread, so one can use the
sched_setaffinity after getting the bit with gettid.
Using NPTL starting with libgc 2.3.4 one can use pthread_[attr_]_[get|
set]affinity_np (defining _GNU_SOURCE)
This is very nice, but not always available.
Looking at the documentation in one place it is said that using
sched_setaffinity(0,...) one sets only the current thread. Is this so
everywhere? If so I could use that in my code.
Is there a plan to directly support thread affinity (vs process)?
Thank you very much
Fawzi
|