L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
utrace::Ring_slot< ITEM_TYPE, GENERATION_PTR > Class Template Reference

Ring buffer slot. More...

#include <ring_buffer>

Inheritance diagram for utrace::Ring_slot< ITEM_TYPE, GENERATION_PTR >:
Collaboration diagram for utrace::Ring_slot< ITEM_TYPE, GENERATION_PTR >:

Static Public Member Functions

static size_t size (size_t const items)
 Get the size (in bytes) of the given count of items.

Detailed Description

template<typename ITEM_TYPE, auto GENERATION_PTR>
class utrace::Ring_slot< ITEM_TYPE, GENERATION_PTR >

Ring buffer slot.

The ring buffer slot encapsulates one ring buffer item and makes sure that the item is aligned to the nearest larger power-of-two of its size.

Another purpose of this class is to abstract away the access to the sequence number of the item.

Template Parameters
ITEM_TYPEActual ring buffer item type.
GENERATION_PTRClass member pointer to the member that contains the sequence number within the item. The member needs to be suitable for an atomic reference.

Definition at line 207 of file ring_buffer.

Member Function Documentation

◆ size()

template<typename ITEM_TYPE, auto GENERATION_PTR>
size_t utrace::Ring_slot< ITEM_TYPE, GENERATION_PTR >::size ( size_t const items)
inlinestatic

Get the size (in bytes) of the given count of items.

Parameters
itemsCount of items.
Returns
Size (in bytes) of the given count of items.

Definition at line 224 of file ring_buffer.


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