fairness  v1.0.0
A collection of advanced syncronization mechanisms.
Loading...
Searching...
No Matches
config.hpp
Go to the documentation of this file.
1
13#ifndef BOOST_FAIRNESS_CONFIG_HPP
14#define BOOST_FAIRNESS_CONFIG_HPP
15
16
17
18#ifdef BOOST_FAIRNESS_USE_TATAS
22#define BOOST_FAIRNESS_USE_TATAS_SPINLOCK
23#endif // BOOST_FAIRNESS_USE_TATAS
24
25
26
27#ifndef BOOST_FAIRNESS_GETREQUEST_SPINS
31#define BOOST_FAIRNESS_GETREQUEST_SPINS 1
32#endif // BOOST_FAIRNESS_GETREQUEST_SPINS
33
34
35
36#ifndef BOOST_FAIRNESS_GETREQUEST_SPINS_RELAXED
40#define BOOST_FAIRNESS_GETREQUEST_SPINS_RELAXED 1
41#endif // BOOST_FAIRNESS_GETREQUEST_SPINS_RELAXED
42
43
44
45#ifndef BOOST_FAIRNESS_SPINWAIT_SPINS
49#define BOOST_FAIRNESS_SPINWAIT_SPINS 16
50#endif // BOOST_FAIRNESS_SPINWAIT_SPINS
51
52
53
54#ifndef BOOST_FAIRNESS_SPINWAIT_SPINS_RELAXED
58#define BOOST_FAIRNESS_SPINWAIT_SPINS_RELAXED 12
59#endif // BOOST_FAIRNESS_SPINWAIT_SPINS_RELAXED
60
61
62
63#ifndef BOOST_FAIRNESS_WAIT_SPINS
67#define BOOST_FAIRNESS_WAIT_SPINS 16
68#endif // BOOST_FAIRNESS_WAIT_SPINS
69
70
71
72#ifndef BOOST_FAIRNESS_WAIT_SPINS_RELAXED
76#define BOOST_FAIRNESS_WAIT_SPINS_RELAXED 12
77#endif // BOOST_FAIRNESS_WAIT_SPINS_RELAXED
78
79
80
81#ifndef BOOST_FAIRNESS_HARDWARE_DESTRUCTIVE_SIZE
85#define BOOST_FAIRNESS_HARDWARE_DESTRUCTIVE_SIZE 128
86#endif // BOOST_FAIRNESS_HARDWARE_DESTRUCTIVE_SIZE
87
88
89
90#ifndef BOOST_FAIRNESS_MAX_PQNODES
96#define BOOST_FAIRNESS_MAX_PQNODES 4
97#endif // BOOST_FAIRNESS_HARDWARE_DESTRUCTIVE_SIZE
98#define BOOST_FAIRNESS_INVALID_PQNODE_INDEX BOOST_FAIRNESS_MAX_PQNODES
99static_assert(BOOST_FAIRNESS_MAX_PQNODES > 2, "BOOST_FAIRNESS_MAX_PQNODES less than 3.");
100
101
102
103#ifndef BOOST_FAIRNESS_MAX_THREADS
113#define BOOST_FAIRNESS_MAX_THREADS 4
114#endif // BOOST_FAIRNESS_HARDWARE_DESTRUCTIVE_SIZE
115#define BOOST_FAIRNESS_INVALID_THREAD_INDEX BOOST_FAIRNESS_MAX_THREADS
116
117
118
119/*
120 If we have boost lib include boost atomic
121 */
122#ifdef BOOST_FOUND
123#include <boost/atomic.hpp>
124#endif // BOOST_FOUND
125
126
127
128#if defined(BOOST_ATOMIC_INT128_LOCK_FREE) && BOOST_ATOMIC_INT128_LOCK_FREE > 0
132#define BOOST_FAIRNESS_HAS_DWCAS
133
134#endif // BOOST_FAIRNESS_HAS_DWCAS
135
136
137
141#define BOOST_FAIRNESS_USE_STD_WAIT_NOTIFY
142
143
144
145
149#if defined(BOOST_FAIRNESS_USE_EXPERIMENTAL_WAIT_NOTIFY)
150#undef BOOST_FAIRNESS_USE_STD_WAIT_NOTIFY
151#endif
152
153
154
155/*
156 Operating systems
157 */
158#if defined(_WIN32)
160#else
162#endif
163#if defined(__linux__) && !defined(BOOST_FAIRNESS_USE_STD_WAIT_NOTIFY)
165#elif defined(_WIN32) && !defined(BOOST_FAIRNESS_USE_STD_WAIT_NOTIFY)
167#else
168
169#ifndef BOOST_FAIRNESS_USE_STD_WAIT_NOTIFY
173#define BOOST_FAIRNESS_USE_STD_WAIT_NOTIFY
174#endif // BOOST_FAIRNESS_USE_STD_WAIT_NOTIFY
175
177#endif // Operating systems
178
179
180
181#endif // BOOST_FAIRNESS_CONFIG_HPP
#define BOOST_FAIRNESS_MAX_PQNODES
The maximum amount of PQNODES that can be used at the same time per pqspinlock. Setting this too low...
Definition config.hpp:96
This file contains the implementation of the pause operations used by the mutexes on linux.
This file contains the implementation of the pause operations used by the mutexes on windows.
This file contains the implementation of the wait operation for misc os.
This file contains the implementation of the wait operation specific for linux.
This file contains the implementation of the wait operation specific for windows.