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::Cap<L4::Irq> irq = L4Re::chkcap(L4Re::Util::cap_alloc.alloc<L4::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
-- 
Adam                 [email protected]
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/

_______________________________________________
l4-hackers mailing list
[email protected]
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
  • Dummy irq teclis High Elf
    • Re: Dummy irq Adam Lackorzynski

Reply via email to