Intrusive Containers
Loading...
Searching...
No Matches
A Collection of Intrusive Containters.

Files

file  AATreeIn.h
 Intrusive Binary Tree (balanced).
 
file  AATreeIn.hpp
 Intrusive Binary Tree (balanced), Implementation.
 
file  BalTreeIn.h
 Intrusive Binary Tree (balenced).
 
file  BalTreeIn.hpp
 Intrusive Binary Tree, Implementation of Balancing Primitives.
 
file  Container.h
 Intrusive Container Documentation and Base Class.
 
file  DListIn.h
 Intrusive Double Linked List.
 
file  DListIn.hpp
 Intrusive Double Linked List, Implementation.
 
file  ListIn.h
 Intrusive Singly Linked List.
 
file  ListIn.hpp
 Intrusive Singly Linked List, Implementation.
 
file  ManyMany.h
 Intrusive Many to Many Relationship.
 
file  ManyMany.hpp
 Intrusive Many to Many Relationship.
 
file  SortDListIn.hpp
 Intrusive Double Linked List, Implementation.
 
file  SortListIn.h
 Intrusive Sorted Double Linked List.
 
file  SortListIn.hpp
 Intrusive Double Linked List, Implementation.
 
file  TreeIn.h
 Intrusive Binary Tree (unbalanced).
 
file  TreeIn.hpp
 Intrusive Binary Tree (unbalenced), Implementation.
 

Classes

class  AATreeInNode< R, N, K, s, n >
 Intrusive Binary Tree, Node. More...
 
class  AATreeInRoot< R, N, K, s, n >
 Intrusive Binary Tree, Root. More...
 
class  BalTreeInNode< R, N, K, s, n >
 Intrusive Binary Tree, Node. More...
 
class  BalTreeInRoot< R, N, K, s, n >
 Intrusive Binary Tree, Root. More...
 
class  Container< s >
 Base Container Class. More...
 
class  ContainerNode< s >
 Base Container Node Class. More...
 
class  DListInNode< R, N, s, n >
 Intrusive Doubly Linked List, Node. More...
 
class  DListInRoot< R, N, s, n >
 Intrusive Doubly Linked List, List. More...
 
class  ListInNode< R, N, s, n >
 Intrusive Singly Linked List, Node. More...
 
class  ListInRoot< R, N, s, n >
 Intrusive Singly Linked List, List. More...
 
class  ManyManyLink< R, N, s, n, L >
 Intermediate Link for a many-many relationship. More...
 
class  ManyManyNode< R, N, s, n, L >
 Node side of a many-many relationship. More...
 
class  ManyManyRoot< R, N, s, n, L >
 Root side of a many-many relationship. More...
 
class  SortDListInNode< R, N, s, n >
 Intrusive Doubly Linked List, Node. More...
 
class  SortDListInRoot< R, N, s, n >
 Intrusive Doubly Linked List, List. More...
 
class  SortListInNode< R, N, s, n >
 Intrusive Doubly Linked List, Node. More...
 
class  SortListInRoot< R, N, s, n >
 Intrusive Doubly Linked List, List. More...
 
class  TreeInNode< R, N, K, s, n >
 Intrusive Binary Tree, Node. More...
 
class  TreeInRoot< R, N, K, s, n >
 Intrusive Binary Tree, Root. More...
 

Macros

#define CONTAINER_OS   CONTINER_OS_FREERTOS
 OS Selection for Thread Safety Selection.
 
#define CONTAINER_OS_CMSIS   2
 CMSIS based Safety layer.
 
#define CONTAINER_OS_CMSIS2   3
 CMSIS version 2 based Safety layer.
 
#define CONTAINER_OS_FREERTOS   1
 FreeRTOS based Safety layer.
 
#define CONTAINER_OS_USER   0
 User Defined Safety Layer.
 

Enumerations

enum  ContainerThreadSafety {
  ContainerNoSafety , ContainerReadWrite , ContainerMutexSafe , ContainerTaskOnly ,
  ContainerTaskSafe , ContainerISRSafe
}
 Thread Safety selection for container. More...
 

Detailed Description

Macro Definition Documentation

◆ CONTAINER_OS

#define CONTAINER_OS   CONTINER_OS_FREERTOS

OS Selection for Thread Safety Selection.

One of:

◆ CONTAINER_OS_CMSIS

#define CONTAINER_OS_CMSIS   2

CMSIS based Safety layer.

Todo
Implement CMSIS Container Safety layer


◆ CONTAINER_OS_CMSIS2

#define CONTAINER_OS_CMSIS2   3

CMSIS version 2 based Safety layer.

Todo
Implement CMSIS2 Container Safety layer


◆ CONTAINER_OS_FREERTOS

#define CONTAINER_OS_FREERTOS   1

FreeRTOS based Safety layer.


◆ CONTAINER_OS_USER

#define CONTAINER_OS_USER   0

User Defined Safety Layer.

The User Application needs to define the member functions for Container<s> and ContainerNode<s> for each supported ContainerThreadSafety level it will support except ContainerNoSafety which will still have the default no locking.

Enumeration Type Documentation

◆ ContainerThreadSafety

Thread Safety selection for container.

  • ContainerNoSafety: No safety provided by container, all needs to be supplied by the application. Suitable for containers built at startup so have no safety issues or containers externally managed by the application
  • ContainerMutexSafe: Will use a Mutex to protect the container.
  • ContainerTaskSafe: Critical Sections will be used around updates and internal searches such that the container is safe to be updated by a task, and possibly read by an ISR. Global locks are used
  • ContainerISRSafe: Critical Sections will be used around updates and internal searches such that the container is safe to be updated by either a task or by an ISR. Note, this may cause longer critical sections.

Note, it is presumed that while the containers may be shared between tasks / interrupts, that a given node have its root connections be changed by two different tasks / interrupts.

TODO: May want to look at implementing a R/W lock version for TaskSafe updates that has minimal global critical sections.

ContainerThreadSafety ISR? Read Write
ContainerNoSafety User Def
ContainerReadWrite No Access Container Shared Container Exclusive
ContainerMutexSafe No Access Container Exclusive Container Exclusive
ContainerTaskOnly No Access Exclusive Section Exclusive Section
ContainerTaskSafe Read Only Exclusive Section Critical Section
ContainerISRSafe Read/Write Critical Section Critical Section
  • Critical Section: Interrupts will be disabled to prevent an ISR for interfacing
  • Exclusive Section: Processor Lock held to not let other tasks interfere
  • Container Exclusive: A Lock in the container held, keeping other tasks out of the Container
  • Container Shared: A Read lock in the container is held, keeping other tasks from changing the Container.
Warning
Most of the use of this library has been with ContainerNoSafety, so there may be errors in the other versions.
Enumerator
ContainerNoSafety 

Thread Safety (if needed) provided by the application.

ContainerReadWrite 

Container will include a Read/Write lock to protect updates in tasks.

ContainerMutexSafe 

Container will include a Mutex to protect updates in Tasks, but not ISRs.

ContainerTaskOnly 

Container will suspend the scheduler as no need to protect from ISR usage.

ContainerTaskSafe 

Container will include Critical Sections to protect updates in tasks, but not ISRs.

ContainerISRSafe 

Container will include Critical Sections to protect updates in ISR and Tasks.