Another way to go is in hwloc_plpa_sched_setaffinity put in
#ifdef HWLOC_LINUX_SYS some code that calls the internal
hwloc_linux_set_tid_cpubind (with a strong comment that nobody else
should call it), so that
- existing linux plpa users can have the same behavior, but we can
document here that calling hwloc_plpa_sched_setaffinity with a pid
different than zero portably means something only for single-threaded
processes.
- non-linux plpa users are restricted to what really is portable.
- we don't have to cripple the hwloc interface (i.e. document that we
accept non-portable input) just for the linuxish interface.
Samuel
|