fairness  v1.0.0
A collection of advanced syncronization mechanisms.
Loading...
Searching...
No Matches
pause_ops_linux.hpp
Go to the documentation of this file.
1
14#ifndef BOOST_FAIRNESS_PAUSE_OPS_LINUX_HPP
15#define BOOST_FAIRNESS_PAUSE_OPS_LINUX_HPP
16
18
19#if defined(__x86_64__) || defined(__i386__)
20 inline void pause_(){
21 __asm__ __volatile__ ("pause");
22 }
23
24#elif defined(__ia64__)
25 inline void pause_(){
26 __asm__ __volatile__ ("hint @pause");
27 }
28
29#elif defined(__arm__)
30 inline void pause_(){
31 __asm__ __volatile__ ("yield");
32 }
33
34#else
35 inline void pause_(){ // even if pause_ get optimized away it doesn`t matter considering this is used with atomic operations, worst case scenrario the thread does not relax
36 return;
37 }
38
39#endif
40
41}
42
43#endif // BOOST_FAIRNESS_PAUSE_OPS_LINUX_HPP
Definition coherent_priority_lock.hpp:25
void pause_()
Definition pause_ops_linux.hpp:35