On 20/12/06, Markus Franke <[EMAIL PROTECTED]> wrote:
Then I misundertood you. See below.
My code for the kernel module looks something like that:
---snip---
int myisr(xnintr_t* cookie)
{
printk("interrupt fired")
}
module_init()
{
rt_intr_create(...,my_isr,...);
rt_intr_enable(...);
register_chrdev(...);
}
---snap---
that's ok.
What about if I write something like that:
---snip---
int myroutine()
{
rt_intr_create(...,my_isr,...);
rt_intr_enable(...);
register_chrdev(...);
}
module_init()
{
rt_task_create(...);
rt_task_start(...,myroutine,...);
}
---snap---
I can't see any difference whether to start a realtime task explicitly
vi "rt_task_create" or not.
In this example, the "myroutine" task is used only to setup an ISR and
register a character device and then it _exits_. It's absolutely not
necessary and your first example is ok.
Look at docs for rt_intr_create()
* This service can be called from:
*
* - Kernel module initialization/cleanup code
* - Kernel-based task
The way how it's registered has no effect on deterministic behavior
wrt irq latencies.
--
Best regards,
Dmitry Adamushko
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help