2
0
mirror of https://github.com/wolfpld/tracy synced 2026-01-19 04:52:09 +00:00
Files
tracy/common/TracyYield.hpp
2020-01-06 17:00:05 +01:00

27 lines
417 B
C++

#ifndef __TRACYYIELD_HPP__
#define __TRACYYIELD_HPP__
#if defined __SSE2__ || defined _M_AMD64 || _M_IX86_FP == 2
# include <emmintrin.h>
#else
# include <thread>
#endif
#include "../common/TracyForceInline.hpp"
namespace tracy
{
static tracy_force_inline void YieldThread()
{
#if defined __SSE2__ || defined _M_AMD64 || _M_IX86_FP == 2
_mm_pause();
#else
std::this_thread::yield();
#endif
}
}
#endif