RAKOTOSALAMA, Nirilanto wrote:
> Thanks Jan,
> 
> It's more and more clear.
> Just a question, I've a little doubt. Native tasks do not inherit
> affinity from their parent process. I've read that cpu affinity 
> setting at pthread creation is only availablle in kernel space.
> Do Posix skin threads inherit affinity from their parent, in user space?

IIRC, pthread CPU affinity is not (yet) covered by the POSIX specs, thus
the behaviour depends on Linux here. Moreover,
pthread_attr_setaffinity_np support for Xenomai is infeasible due to
glibc compatibility issues - again: IIRC. Gilles, please correct my weak
memory on this topic.

> 
> If not, when I "sched_setaffinity" a parent process, I have to 
> recursively "sched_setaffinity" all its threads and force them to
> switch to primary mode. Is it right ?

If you want well-defined target CPUs, then you need explicit
sched_setaffinity, cpusets, or Xenomai 2.4's global affinity mask. But
you don't need to switch back to primary mode, that will happen
automatically.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to