L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
L4Re::Util::Counter< COUNTER > Struct Template Reference

Counter for Counting_cap_alloc with variable data width. More...

#include <counting_cap_alloc>

+ Collaboration diagram for L4Re::Util::Counter< COUNTER >:

Public Member Functions

bool inc ()
 Increment counter if not yet saturated.
 
Type dec ()
 Decrement counter if not saturated.
 

Detailed Description

template<typename COUNTER = unsigned char>
struct L4Re::Util::Counter< COUNTER >

Counter for Counting_cap_alloc with variable data width.

This version is not thread safe.

Definition at line 38 of file counting_cap_alloc.

Member Function Documentation

◆ dec()

template<typename COUNTER = unsigned char>
Type L4Re::Util::Counter< COUNTER >::dec ( )
inline

Decrement counter if not saturated.

Once the counter reached the saturated state, the counter value isn't changed.

Definition at line 78 of file counting_cap_alloc.

◆ inc()

template<typename COUNTER = unsigned char>
bool L4Re::Util::Counter< COUNTER >::inc ( )
inline

Increment counter if not yet saturated.

Once the counter reached the saturated state, the counter value isn't changed.

Return values
falseThe counter just went saturated after it was increased.
trueEither the counter was already saturated – in that case the counter value was not changed, or the counter was not saturated – in that case the counter was increased.

Definition at line 61 of file counting_cap_alloc.


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