fairness
v1.0.0
A collection of advanced syncronization mechanisms.
|
This file contains configurations about boost and 128bit cpu support. TODO. More...
#include <boost/fairness/detail/pause_ops_linux.hpp>
#include <boost/fairness/detail/wait_ops_generic.hpp>
Go to the source code of this file.
Macros | |
#define | BOOST_FAIRNESS_GETREQUEST_SPINS 1 |
The total number of spins performed while performing a getRequest (this is used only if BOOST_FAIRNESS_USE_TATAS is not. | |
#define | BOOST_FAIRNESS_GETREQUEST_SPINS_RELAXED 1 |
The number of paused spins performed while performing a getRequest (this is used only if BOOST_FAIRNESS_USE_TATAS is not. | |
#define | BOOST_FAIRNESS_HARDWARE_DESTRUCTIVE_SIZE 128 |
Size to be aligned to avoid false sharing | |
#define | BOOST_FAIRNESS_INVALID_PQNODE_INDEX BOOST_FAIRNESS_MAX_PQNODES |
#define | BOOST_FAIRNESS_INVALID_THREAD_INDEX BOOST_FAIRNESS_MAX_THREADS |
#define | BOOST_FAIRNESS_MAX_PQNODES 4 |
The maximum amount of PQNODES that can be used at the same time per pqspinlock. Setting this too low may make the mutex less fair (some tests might even fail). Ideally you have 1 PQNODE per thread. | |
#define | BOOST_FAIRNESS_MAX_THREADS 4 |
Unlike what it may seems this macro does not set the maximum number of supported threads. Instead this macro tells the library how many thread struct there are per thread/pqspinlock pair to be used. A good way of seeing it is how many re entrant calls will you make on priority mutexes. If you plan on using N priority mutexes and locking all of them with the same thread set this number to N. | |
#define | BOOST_FAIRNESS_SPINWAIT_SPINS 16 |
The total number of spins during a spin_wait operation. | |
#define | BOOST_FAIRNESS_SPINWAIT_SPINS_RELAXED 12 |
The number of relaxed spins during a spin_wait operation. | |
#define | BOOST_FAIRNESS_USE_STD_WAIT_NOTIFY |
boost fairness will use atomic::wait/notify implemented by the standard lib instead of its own implementation by default. | |
#define | BOOST_FAIRNESS_WAIT_SPINS 16 |
The total number of spins during a wait operation before a syscall to the OS to yield the cpu through futex on linux or waitOnAdress on windows. | |
#define | BOOST_FAIRNESS_WAIT_SPINS_RELAXED 12 |
The total number of spins during a wait operation before a syscall to the OS to yield the cpu through futex on linux or waitOnAdress on windows. | |
This file contains configurations about boost and 128bit cpu support. TODO.
#define BOOST_FAIRNESS_GETREQUEST_SPINS 1 |
The total number of spins performed while performing a getRequest (this is used only if BOOST_FAIRNESS_USE_TATAS is not.
#define BOOST_FAIRNESS_GETREQUEST_SPINS_RELAXED 1 |
The number of paused spins performed while performing a getRequest (this is used only if BOOST_FAIRNESS_USE_TATAS is not.
#define BOOST_FAIRNESS_HARDWARE_DESTRUCTIVE_SIZE 128 |
Size to be aligned to avoid false sharing
#define BOOST_FAIRNESS_INVALID_PQNODE_INDEX BOOST_FAIRNESS_MAX_PQNODES |
#define BOOST_FAIRNESS_INVALID_THREAD_INDEX BOOST_FAIRNESS_MAX_THREADS |
#define BOOST_FAIRNESS_MAX_PQNODES 4 |
The maximum amount of PQNODES that can be used at the same time per pqspinlock.
Setting this too low may make the mutex less fair (some tests might even fail). Ideally you have 1 PQNODE per thread.
#define BOOST_FAIRNESS_MAX_THREADS 4 |
Unlike what it may seems this macro does not set the maximum number of supported threads.
Instead this macro tells the library how many thread struct there are per thread/pqspinlock pair to be used.
A good way of seeing it is how many re entrant calls will you make on priority mutexes.
If you plan on using N priority mutexes and locking all of them with the same thread set this number to N.
#define BOOST_FAIRNESS_SPINWAIT_SPINS 16 |
The total number of spins during a spin_wait operation.
#define BOOST_FAIRNESS_SPINWAIT_SPINS_RELAXED 12 |
The number of relaxed spins during a spin_wait operation.
#define BOOST_FAIRNESS_USE_STD_WAIT_NOTIFY |
boost fairness will use atomic::wait/notify implemented by the standard lib instead of its own implementation by default.
#define BOOST_FAIRNESS_WAIT_SPINS 16 |
The total number of spins during a wait operation before a syscall to the OS to yield the cpu through futex on linux or waitOnAdress on windows.
#define BOOST_FAIRNESS_WAIT_SPINS_RELAXED 12 |
The total number of spins during a wait operation before a syscall to the OS to yield the cpu through futex on linux or waitOnAdress on windows.