If I wanted to create a dummy irq that didn't actually exist in hardware but I could use for asynchronous notification between processes or between a hypervisor and a VM how would I do that in L4Re? What would the dummy entry look like in the .devs file?
thanks
On Thu Oct 30, 2014 at 11:00:22 -0400, teclis High Elf wrote:
If I wanted to create a dummy irq that didn't actually exist in hardware but I could use for asynchronous notification between processes or between a hypervisor and a VM how would I do that in L4Re? What would the dummy entry look like in the .devs file?
You do not need any dummy IRQ entry or similar, nor IO or anything in there. Creating an Irq object works like creating any other object:
L4::CapL4::Irq irq = L4Re::chkcap(L4Re::Util::cap_alloc.allocL4::Irq()); L4Re::chksys(L4Re::Env::env()->factory()->create_irq(irq), "IRQ creation failed");
In one thread you bind the IRQ to the thread, e.g.: L4Re::chksys(irq->attach(label, L4Re::Env::env()->main_thread()), "Attaching IRQ failed"); Then you wait.
On the other side you call trigger(): irq->trigger();
There's an example in l4/pkg/examples/sys/map_irq which does this between two tasks.
Adam
l4-hackers@os.inf.tu-dresden.de