SuperTinyKernel™ RTOS 1.05.3
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
Loading...
Searching...
No Matches
stk_linked_list.h File Reference

Intrusive doubly-linked list implementation used internally by the kernel. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  stk::util::DListEntry< T, _ClosedLoop >
 Intrusive doubly-linked list node. Embed this as a base class in any object (T) that needs to participate in a DListHead list. More...
class  stk::util::DListHead< T, _ClosedLoop >
 Intrusive doubly-linked list container. Manages a collection of DListEntry nodes embedded in host objects of type T. More...

Namespaces

namespace  stk
 Namespace of STK package.
namespace  stk::util
 Internal utility namespace containing data structure helpers (linked lists, etc.) used by the kernel implementation. Not part of the public user API.

Detailed Description

Intrusive doubly-linked list implementation used internally by the kernel.

Provides two class templates:

  • DListEntry<T, _ClosedLoop>: the node embedded inside a host object (T).
  • DListHead<T, _ClosedLoop>: the list container that owns and traverses the nodes.

The list is intrusive: the link pointers live inside the host object itself, so no separate heap allocation is required for list membership. A single host object may belong to at most one list at a time.

The _ClosedLoop template parameter selects between two structural variants:

  • false: open (linear) list — first->prev and last->next are NULL.
  • true: closed (circular) list — first->prev points to last and last->next points to first, enabling O(1) wrap-around traversal.

Definition in file stk_linked_list.h.