Example of an interrupt service routine.
#include <l4/sys/utcb.h>
#include <stdio.h>
int main(void)
{
int irqno = 1;
int err;
{
printf("Did not find an ICU\n");
return 1;
}
return 1;
{
printf(
"Could not create IRQ object: %lx\n",
l4_error(tag));
return 1;
}
{
printf("Binding IRQ%d to the ICU failed\n", irqno);
return 1;
}
{
printf("Error binding to IRQ %d: %d\n", irqno, err);
return 1;
}
printf("Attached to key IRQ %d\nPress keys now, Shift-Q to exit\n", irqno);
while (1)
{
unsigned long label = 0;
printf("Error on IRQ receive: %d\n", err);
else
{
printf("Got IRQ with label 0x%lX\n", label);
}
}
printf("Error detach from IRQ: %d\n", err);
return 0;
}