mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Revert most of r3855.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3875 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -40,7 +40,6 @@
|
||||
#include <unistd.h>
|
||||
#ifdef _POSIX_THREADS
|
||||
#include <pthread.h>
|
||||
#include <sched.h>
|
||||
#elif GEKKO
|
||||
#include <ogc/lwp_threads.h>
|
||||
#else
|
||||
@ -176,15 +175,14 @@ void InitThreading();
|
||||
void SleepCurrentThread(int ms);
|
||||
|
||||
// YieldCPU: Use this function during a spin-wait to make the current thread
|
||||
// relax while another thread is working.
|
||||
// If you find yourself calling this function, please consider using an event-
|
||||
// based design instead.
|
||||
// relax while another thread is working. This may be more efficient than using
|
||||
// events because event functions use kernel calls.
|
||||
inline void YieldCPU()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
SwitchToThread();
|
||||
#elif defined _POSIX_THREADS
|
||||
sched_yield();
|
||||
YieldProcessor();
|
||||
#elif defined(_M_IX86) || defined(_M_X64)
|
||||
_mm_pause();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user