fairness  v1.0.0
A collection of advanced syncronization mechanisms.
Loading...
Searching...
No Matches
priority_t.hpp File Reference

Alias the type Priority_t. Priority_t is the type of priorities that are used by the priority_mutexes. More...

#include <cstdint>
Include dependency graph for priority_t.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  boost
 
namespace  boost::fairness
 

Macros

#define BOOST_FAIRNESS_INVALID_PRIORITY   Priority_t(-1)
 A number indicating an invalid priority which is not usable by the mutexes.
 
#define BOOST_FAIRNESS_MAXIMUM_PRIORITY   Priority_t(-1)
 Priorities are indexes in an array, that means that if I define a priority_mutex<BOOST_FAIRNESS_MAXIMUM_PRIORITY> m; we can call m.lock(p) with a p up to BOOST_FAIRNESS_MAXIMUM_PRIORITY - 1; this means that a priority to be valid has to be in the range [BOOST_FAIRNESS_MINIMUM_PRIORITY, BOOST_FAIRNESS_MAXIMUM_PRIORITY)
 
#define BOOST_FAIRNESS_MINIMUM_PRIORITY   0
 Priorities are indexes in an array, that means that if I define a priority_mutex<BOOST_FAIRNESS_MAXIMUM_PRIORITY> m; we can call m.lock(p) with a p up to BOOST_FAIRNESS_MAXIMUM_PRIORITY - 1; this means that a priority to be valid has to be in the range [BOOST_FAIRNESS_MINIMUM_PRIORITY, BOOST_FAIRNESS_MAXIMUM_PRIORITY)
 

Typedefs

using boost::fairness::Priority_t = uint8_t
 

Functions

bool boost::fairness::is_valid_priority (Priority_t const p)
 allows you to verify that an input priority is valid. Has to be in the range [BOOST_FAIRNESS_MINIMUM_PRIORITY, BOOST_FAIRNESS_MAXIMUM_PRIORITY).
 

Detailed Description

Alias the type Priority_t. Priority_t is the type of priorities that are used by the priority_mutexes.

Author
F. Abrignani (feder.nosp@m.igno.nosp@m.li@ho.nosp@m.tmai.nosp@m.l.it)
S. Martorana (salva.nosp@m.tore.nosp@m.marto.nosp@m.rana.nosp@m.@hotm.nosp@m.ail..nosp@m.com)
Version
0.1
Date
2023-08-19

Macro Definition Documentation

◆ BOOST_FAIRNESS_INVALID_PRIORITY

#define BOOST_FAIRNESS_INVALID_PRIORITY   Priority_t(-1)

A number indicating an invalid priority which is not usable by the mutexes.

◆ BOOST_FAIRNESS_MAXIMUM_PRIORITY

#define BOOST_FAIRNESS_MAXIMUM_PRIORITY   Priority_t(-1)

Priorities are indexes in an array, that means that if I define a priority_mutex<BOOST_FAIRNESS_MAXIMUM_PRIORITY> m; we can call m.lock(p) with a p up to BOOST_FAIRNESS_MAXIMUM_PRIORITY - 1; this means that a priority to be valid has to be in the range [BOOST_FAIRNESS_MINIMUM_PRIORITY, BOOST_FAIRNESS_MAXIMUM_PRIORITY)

◆ BOOST_FAIRNESS_MINIMUM_PRIORITY

#define BOOST_FAIRNESS_MINIMUM_PRIORITY   0

Priorities are indexes in an array, that means that if I define a priority_mutex<BOOST_FAIRNESS_MAXIMUM_PRIORITY> m; we can call m.lock(p) with a p up to BOOST_FAIRNESS_MAXIMUM_PRIORITY - 1; this means that a priority to be valid has to be in the range [BOOST_FAIRNESS_MINIMUM_PRIORITY, BOOST_FAIRNESS_MAXIMUM_PRIORITY)