L4Re - L4 Runtime Environment
L4Re::Util::Event_buffer_consumer_t< PAYLOAD > Class Template Reference

An event buffer consumer. More...

+ Inheritance diagram for L4Re::Util::Event_buffer_consumer_t< PAYLOAD >:
+ Collaboration diagram for L4Re::Util::Event_buffer_consumer_t< PAYLOAD >:

Public Member Functions

template<typename CB , typename D >
void foreach_available_event (CB const &cb, D data=D())
 Call function on every available event. More...
 
template<typename CB , typename D >
void process (L4::Cap< L4::Irq > irq, L4::Cap< L4::Thread > thread, CB const &cb, D data=D())
 Continuously wait for events and process them. More...
 
- Public Member Functions inherited from L4Re::Util::Event_buffer_t< PAYLOAD >
void * buf () const throw ()
 Return the buffer. More...
 
long attach (L4::Cap< L4Re::Dataspace > ds, L4::Cap< L4Re::Rm > rm) throw ()
 Attach event buffer from address space. More...
 
long detach (L4::Cap< L4Re::Rm > rm) throw ()
 Detach event buffer from address space. More...
 
- Public Member Functions inherited from L4Re::Event_buffer_t< PAYLOAD >
 Event_buffer_t (void *buffer, l4_addr_t size)
 Initialize event buffer. More...
 
Eventnext () throw ()
 Next event in buffer. More...
 
bool put (Event const &ev) throw ()
 Put event into buffer at current position. More...
 

Detailed Description

template<typename PAYLOAD>
class L4Re::Util::Event_buffer_consumer_t< PAYLOAD >

An event buffer consumer.

Definition at line 92 of file event_buffer.

Member Function Documentation

◆ foreach_available_event()

template<typename PAYLOAD >
template<typename CB , typename D >
void L4Re::Util::Event_buffer_consumer_t< PAYLOAD >::foreach_available_event ( CB const &  cb,
data = D() 
)
inline

Call function on every available event.

Parameters
cbFunction callback.
dataData to pass as an argument to the callback.

Definition at line 103 of file event_buffer.

◆ process()

template<typename PAYLOAD >
template<typename CB , typename D >
void L4Re::Util::Event_buffer_consumer_t< PAYLOAD >::process ( L4::Cap< L4::Irq irq,
L4::Cap< L4::Thread thread,
CB const &  cb,
data = D() 
)
inline

Continuously wait for events and process them.

Parameters
irqEvent signal to wait for.
threadThread capability of the thread calling this function.
cbCallback function that is called for each received event.
dataData to pass as an argument to the processing callback.
Note
This function never returns.

Definition at line 124 of file event_buffer.


The documentation for this class was generated from the following file: