Well I was browsing through some coding help sites that I found by searching _mm_pause and reading through Msdn..
Sigh, I wish I knew how to code.. I really do want to help to the best of my abilities.
But I solved the compilation errors, here's the actual code (Did require edits to other source files to change YieldCPU to YieldProcessor:
The code above may still need a minor edit. According to MSDN and other coding site, shouldn't YieldCPU(); or YieldProcessor(); be void YieldCPU(void); or void YieldProcessor(void); instead?
Sigh, I wish I knew how to code.. I really do want to help to the best of my abilities.
But I solved the compilation errors, here's the actual code (Did require edits to other source files to change YieldCPU to YieldProcessor:
Quote:inline void YieldProcessor()
{
#ifdef _WIN32
Sleep(0);
#elif defined(_M_IX86) || defined(_M_X64)
thr_yield();
#else
sched_yield();
#endif
}
The code above may still need a minor edit. According to MSDN and other coding site, shouldn't YieldCPU(); or YieldProcessor(); be void YieldCPU(void); or void YieldProcessor(void); instead?


)
( And a little English )
