Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
28
third-party/vendor/tracy-client-sys/tracy/common/TracyYield.hpp
vendored
Normal file
28
third-party/vendor/tracy-client-sys/tracy/common/TracyYield.hpp
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#ifndef __TRACYYIELD_HPP__
|
||||
#define __TRACYYIELD_HPP__
|
||||
|
||||
#if defined __SSE2__ || defined _M_AMD64 || (defined _M_IX86_FP && _M_IX86_FP == 2)
|
||||
# include <emmintrin.h>
|
||||
#else
|
||||
# include <thread>
|
||||
#endif
|
||||
|
||||
#include "TracyForceInline.hpp"
|
||||
|
||||
namespace tracy
|
||||
{
|
||||
|
||||
static tracy_force_inline void YieldThread()
|
||||
{
|
||||
#if defined __SSE2__ || defined _M_AMD64 || (defined _M_IX86_FP && _M_IX86_FP == 2)
|
||||
_mm_pause();
|
||||
#elif defined __aarch64__
|
||||
asm volatile( "isb" : : );
|
||||
#else
|
||||
std::this_thread::yield();
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue