summaryrefslogtreecommitdiff
path: root/Source/Core/Common
diff options
context:
space:
mode:
authorNolan Check <Nolan.Check@gmail.com>2009-07-23 21:17:14 +0000
committerNolan Check <Nolan.Check@gmail.com>2009-07-23 21:17:14 +0000
commitce8b679d76d7100c50859cc39ede7f9fa006fa28 (patch)
treef3daebea8596a3381d02250257be8c477578dad2 /Source/Core/Common
parent3c9b5bbf7b98702a34d3c5336c62ef0c5eebec3a (diff)
Revert most of r3855.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3875 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common')
-rw-r--r--Source/Core/Common/Src/Thread.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/Core/Common/Src/Thread.h b/Source/Core/Common/Src/Thread.h
index 8cd29726e0..b51d4185ca 100644
--- a/Source/Core/Common/Src/Thread.h
+++ b/Source/Core/Common/Src/Thread.h
@@ -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
}