CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Loading...
Searching...
No Matches
ds::linked_list::Sentinel< CellTemplateArg > Struct Template Reference

Convenience wrapper for a sentinel cons cell, encapsulating some common patterns. More...

#include <linked_list.h>

Collaboration diagram for ds::linked_list::Sentinel< CellTemplateArg >:

Public Types

using Cell = CellTemplateArg

Public Member Functions

void reset ()
bool is_empty ()
void append (Cell *elem)
void append_emplace (Cell *elem)
void prepend (Cell *elem)
Cell * first ()
Cell * last ()
Cell * unsafe_take_first ()
Cell * take_all ()
template<typename F>
bool search (F f)

Public Attributes

Cell sentinel = {}
 The sentinel node itself.

Detailed Description

template<cell::HasCellOperationsReset CellTemplateArg>
struct ds::linked_list::Sentinel< CellTemplateArg >

Convenience wrapper for a sentinel cons cell, encapsulating some common patterns.

Definition at line 362 of file linked_list.h.

Member Typedef Documentation

◆ Cell

template<cell::HasCellOperationsReset CellTemplateArg>
using ds::linked_list::Sentinel< CellTemplateArg >::Cell = CellTemplateArg

Definition at line 364 of file linked_list.h.

Member Function Documentation

◆ append()

template<cell::HasCellOperationsReset CellTemplateArg>
void ds::linked_list::Sentinel< CellTemplateArg >::append ( Cell * elem)
inline

Definition at line 389 of file linked_list.h.

◆ append_emplace()

template<cell::HasCellOperationsReset CellTemplateArg>
void ds::linked_list::Sentinel< CellTemplateArg >::append_emplace ( Cell * elem)
inline

Definition at line 394 of file linked_list.h.

◆ first()

template<cell::HasCellOperationsReset CellTemplateArg>
Cell * ds::linked_list::Sentinel< CellTemplateArg >::first ( )
inline

Definition at line 404 of file linked_list.h.

◆ is_empty()

template<cell::HasCellOperationsReset CellTemplateArg>
bool ds::linked_list::Sentinel< CellTemplateArg >::is_empty ( )
inline

Definition at line 384 of file linked_list.h.

◆ last()

template<cell::HasCellOperationsReset CellTemplateArg>
Cell * ds::linked_list::Sentinel< CellTemplateArg >::last ( )
inline

Definition at line 409 of file linked_list.h.

◆ prepend()

template<cell::HasCellOperationsReset CellTemplateArg>
void ds::linked_list::Sentinel< CellTemplateArg >::prepend ( Cell * elem)
inline

Definition at line 399 of file linked_list.h.

◆ reset()

template<cell::HasCellOperationsReset CellTemplateArg>
void ds::linked_list::Sentinel< CellTemplateArg >::reset ( )
inline

Definition at line 379 of file linked_list.h.

◆ search()

template<cell::HasCellOperationsReset CellTemplateArg>
template<typename F>
bool ds::linked_list::Sentinel< CellTemplateArg >::search ( F f)
inline

Definition at line 429 of file linked_list.h.

◆ take_all()

template<cell::HasCellOperationsReset CellTemplateArg>
Cell * ds::linked_list::Sentinel< CellTemplateArg >::take_all ( )
inline

Definition at line 421 of file linked_list.h.

◆ unsafe_take_first()

template<cell::HasCellOperationsReset CellTemplateArg>
Cell * ds::linked_list::Sentinel< CellTemplateArg >::unsafe_take_first ( )
inline

Definition at line 414 of file linked_list.h.

Member Data Documentation

◆ sentinel

template<cell::HasCellOperationsReset CellTemplateArg>
Cell ds::linked_list::Sentinel< CellTemplateArg >::sentinel = {}

The sentinel node itself.

Viewing the ring as a list, this effectively serves as pointers to the head (next) and to the tail (prev) of the list. Unlike more traditional nullptr-terminated lists, though, here, the sentinel participates in the ring.

This is marked cheri_no_subobject_bounds because some of our cons cell implementations use pointer proxies that rely on the bounds provided by this (which, in turn, is likely to be cheri_no_subobject_bounds)

Definition at line 377 of file linked_list.h.


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