* [Xenomai] how to install a "preemption hook"?
@ 2013-03-11 4:15 Tom Z
2013-03-11 7:11 ` Gilles Chanteperdrix
0 siblings, 1 reply; 2+ messages in thread
From: Tom Z @ 2013-03-11 4:15 UTC (permalink / raw)
To: xenomai
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.
Tom
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Xenomai] how to install a "preemption hook"?
2013-03-11 4:15 [Xenomai] how to install a "preemption hook"? Tom Z
@ 2013-03-11 7:11 ` Gilles Chanteperdrix
0 siblings, 0 replies; 2+ messages in thread
From: Gilles Chanteperdrix @ 2013-03-11 7:11 UTC (permalink / raw)
To: Tom Z; +Cc: xenomai
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-11 7:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-11 4:15 [Xenomai] how to install a "preemption hook"? Tom Z
2013-03-11 7:11 ` Gilles Chanteperdrix
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.