[okl4-developer] Interrupts
Sebastian Huß
sebastian.huss at opensynergy.com
Mon Jun 2 20:38:34 EST 2008
Hi,
I'm trying to implement some interrupt handling, but my approaches don't work yet.
First approach: using the [irq_handler] - flag in the corresponding idl4-file
The correct server code is generated and I have the handler-function:
void
testdriver_irq_handler(L4_ThreadId_t partner)
{
printf("IRQ%d, function %d is called!\n", (int)L4_ThreadNo(partner), funcNum);
}
int main(int argc, char **argv)
{
L4_ThreadId_t main_tid;
main_tid = thread_l4tid(env_thread(iguana_getenv("MAIN")));
hardware_register_interrupt(main_tid, 11);
printf("<===== Testdriver Started =====>\n");
testdriver_server_loop();
assert(!"Shouldn't reach here\n");
}
I let it all run in a modified qemu where I can initiate interrupts (and this works with another flavor of L4),
but no interrupts get through to my irq_handler.
In another attempt I dismissed the middle-man (the server_loop and the irq_handler-function)
And implemented according to another example here in the mailing list, still no results.
int main(int argc, char **argv)
{
L4_ThreadId_t main_tid;
L4_ThreadId_t from_tid;
main_tid = thread_l4tid(env_thread(iguana_getenv("MAIN")));
hardware_register_interrupt(main_tid, 11);
printf("<===== Testdriver Started =====>\n");
for(;;)
{
L4_Wait(&from_tid);
printf("from_tid %d is called!\n", (int)L4_ThreadNo(from_tid));
}
}
Additionally, I tried all this with the following (to see anything), without results.
for(int i=0;i<45;i++)
{
hardware_register_interrupt(main_tid, i);
}
I think I must be missing something, but I found nothing even grepping through the sources.
Thanks in advance,
Sebastian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.okl4.org/pipermail/developer/attachments/20080602/c2473a5a/attachment.htm
More information about the Developer
mailing list