30 #include <l4/re/util/event_buffer> 32 #include <l4/cxx/type_traits> 34 namespace L4Re {
namespace Util {
42 template<
typename PAYLOAD >
69 template<
typename IRQ_TYPE>
75 if (!ev_ds.is_valid())
81 if (!ev_irq.is_valid())
84 if ((r =
l4_error(env->factory()->create(ev_irq.get()))))
93 long sz = ev_ds->size();
97 Rm::Unique_region<void*> buf;
104 _ev_ds = cxx::move(ev_ds);
105 _ev_irq = cxx::move(ev_irq);
106 _buf = cxx::move(buf);
127 if (!ev_ds.is_valid())
135 long sz = ev_ds->size();
139 Rm::Unique_region<void*> buf;
146 _ev_ds = cxx::move(ev_ds);
147 _buf = cxx::move(buf);
170 Rm::Unique_region<void*> _buf;
Unique_cap / Unique_del_cap.
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.
L4::Detail::Unique_cap_impl< T, Smart_cap_auto< L4_FP_DELETE_OBJ > > Unique_del_cap
Unique capability that implements automatic free and unmap+delete of the capability selector...
Search for a suitable address range.
L4::Cap< L4::Triggerable > irq() const
Get event IRQ.
Interface for memory-like objects.
L4::Detail::Unique_cap_impl< T, Smart_cap_auto< L4_FP_ALL_SPACES > > Unique_cap
Unique capability that implements automatic free and unmap of the capability selector.
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.
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.