memgraph/utils/cpu_relax.hpp

10 lines
174 B
C++
Raw Normal View History

2015-11-26 09:52:51 +08:00
#pragma once
/* @brief improves contention in spinlocks
* hints the processor that we're in a spinlock and not doing much
*/
inline void cpu_relax()
{
asm("PAUSE");
}