Loading...
Searching...
No Matches
L4Re::Util::Event_buffer_consumer_t< PAYLOAD > Class Template Reference
L4Re C++ Interface » L4Re Util C++ Interface

An event buffer consumer. More...

`#include <event_buffer>`

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.
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.
Public Member Functions inherited from L4Re::Util::Event_buffer_t< PAYLOAD >
void * | buf () const noexcept
| Return the buffer.
long | attach (L4::Cap< L4Re::Dataspace > ds, L4::Cap< L4Re::Rm > rm) noexcept
| Attach event buffer from address space.
long | detach (L4::Cap< L4Re::Rm > rm) noexcept
| Detach event buffer from address space.
Public Member Functions inherited from L4Re::Event_buffer_t< PAYLOAD >
Event * | next () noexcept
| Next event in buffer.
bool | put (Event const &ev) noexcept
| Put event into buffer at current position.

## Detailed Description

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

An event buffer consumer.

Definition at line 83 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,
|  | D | data = D() )

inline

Call function on every available event.

Parameters

  cb | Function callback.
  data | Data to pass as an argument to the callback.

Definition at line 94 of file event_buffer.

Referenced by L4Re::Util::Event_buffer_consumer_t< Default_event_payload >::process().

Here is the caller graph for this function:

## 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,
|  | D | data = D() )

inline

Continuously wait for events and process them.

Parameters

  irq | Event signal to wait for.
  thread | Thread capability of the thread calling this function.
  cb | Callback function that is called for each received event.
  data | Data to pass as an argument to the processing callback.

Note
  This function never returns.

Definition at line 115 of file event_buffer.

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

- l4/re/util/event_buffer