On 03/11/2013 05:15 AM, Tom Z wrote:

> Hi,
> 
> I am using native APIs to do some development and have a question
> recently. I have a task A with a medium priority, so during A's
> execution, it could be preempted by higher-priority tasks or
> interrupts. What I want to do is to install a hook so that whenever A
> is preempted, this hook is executed immediately after A is preempted,
> but before the execution of the task that preempts A.
> 
> How can I accomplish this goal? Any ideas would be highly
> appreciated.


In kernel-space, you can use rt_task_add_hook:
http://www.xenomai.org/documentation/xenomai-2.6/html/api/group__task.html#ga7452f367f9e17bf2fc0b70f717b96dd8

-- 
                                                                Gilles.

_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai

Reply via email to