29 #include <l4/re/util/event_buffer> 32 namespace L4Re {
namespace Util {
40 template<
typename PAYLOAD >
67 template<
typename IRQ_TYPE>
73 if (!ev_ds.is_valid())
79 ev_irq = ca->alloc<IRQ_TYPE>();
83 if ((r =
l4_error(env->factory()->create(ev_irq.get()))))
92 long sz = ev_ds->size();
96 Rm::Auto_region<void*> buf;
126 if (!ev_ds.is_valid())
134 long sz = ev_ds->size();
138 Rm::Auto_region<void*> buf;
169 Rm::Auto_region<void*> _buf;
Automatic capability that implements automatic free and unmap of the capability selector.
Create an IRQ and attach, to get notifications.
Abstract capability-allocator interface.
L4Re::Event_buffer_t< PAYLOAD > & buffer()
Get event buffer.
Capability allocator interface.
int init(L4::Cap< L4Re::Event > event, L4Re::Env const *env=L4Re::Env::env(), L4Re::Cap_alloc *ca=L4Re::Cap_alloc::get_cap_alloc(L4Re::Util::cap_alloc))
Initialise an event object.
C++ interface of the initial environment that is provided to an L4 task.
static L4Re::Cap_alloc * get_cap_alloc(CAP_ALLOC &ca)
Construct an instance of a capability allocator.
Search for a suitable address range.
L4::Cap< L4::Triggerable > irq() const
Get event IRQ.
Interface for memory-like objects.
l4_msgtag_t bind(unsigned irqnum, L4::Cap< Triggerable > irq, l4_utcb_t *utcb=l4_utcb())
Bind an interrupt line of an interrupt controller to an interrupt object.
static Env const * env()
Returns the initial environment for the current task.
long get_buffer(L4::Ipc::Out< L4::Cap< Dataspace > > ds)
Get event signal buffer.
_Cap_alloc & cap_alloc
Capability allocator.
int init_poll(L4::Cap< L4Re::Event > event, L4Re::Env const *env=L4Re::Env::env(), L4Re::Cap_alloc *ca=L4Re::Cap_alloc::get_cap_alloc(L4Re::Util::cap_alloc))
Initialise an event object in polling mode.
Cap< T > make_cap_rw(L4::Cap< T > cap)
Make an L4::Ipc::Cap<T> for the given capability with L4_CAP_FPAGE_RW rights.
Automatic capability that implements automatic free and unmap+delete of the capability selector...
bool is_valid() const
Test whether the capability is a valid capability index (i.e., not L4_INVALID_CAP).
long l4_error(l4_msgtag_t tag) L4_NOTHROW
Return error code of a system call return message tag.
Common factory related definitions.
Convenience wrapper for getting access to an event object.
C++ interface for capabilities.