Skip to contentSkip to conversation

Xenomai 3.0.6 - affinity rtdm task to to specific core CPU

Xenomai Piotr Piorkowski 2 participants 2 messages Dec 4, 2017 – Dec 5, 2017

lore
Share & tools
lore
#0 lore raw

Hi

Can I affinity rtdm task to to specific core CPU ? If I can, how should I do it ?

Best Regards

Piotr

#1 lore raw
Quoted 5 lines · Piotr Piorkowski

Hi

Can I affinity rtdm task to to specific core CPU ? If I can, how should I do it ?

There is no provision for this in the RTDM API unfortunately.

You have the option of hacking with the Cobalt internal API from your RTDM task implementation this way:

void rtdm_task(void *arg)

{
	struct task_struct *p = current;

	xnthread_relax(0);
	set_cpus_allowed_ptr(p, cpumask_of(cpu_number));
	xnthread_harden();

	/* your code */
}
Signature · 1 line
Philippe.