mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
a little simplification for the dlist id and a little correction to YieldProcessor in windows.
in windows sleep(0) behaves more like what is defined in the yield instruction so use it instead. In my amd 6 core system brings a nice 8% speedup so please test I'm interested in knowing the behavior in different systems. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7261 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -133,14 +133,13 @@ void SetCurrentThreadAffinity(u32 mask);
|
||||
void SleepCurrentThread(int ms);
|
||||
void SwitchCurrentThread(); // On Linux, this is equal to sleep 1ms
|
||||
|
||||
// YieldCPU: This function is only effective on HyperThreading CPU
|
||||
// Use this function during a spin-wait to make the current thread
|
||||
// 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
|
||||
YieldProcessor();
|
||||
Sleep(0);
|
||||
#elif defined(_M_IX86) || defined(_M_X64)
|
||||
usleep(1);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user