Used usleep(1) instead of _mm_pause on Linux and Mac OSX. This reduces the CPU usage in the video thread's idle loop. Added YieldCPU to the DSP LLE loop.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7125 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
daf023f4a0
commit
af139f4661
|
@ -142,7 +142,7 @@ void SetCurrentThreadAffinity(u32 mask);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
YieldProcessor();
|
YieldProcessor();
|
||||||
#elif defined(_M_IX86) || defined(_M_X64)
|
#elif defined(_M_IX86) || defined(_M_X64)
|
||||||
_mm_pause();
|
usleep(1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ void DSPLLE::dsp_thread(DSPLLE *lpParameter)
|
||||||
}
|
}
|
||||||
Common::AtomicStore(dsp_lle->m_cycle_count, 0);
|
Common::AtomicStore(dsp_lle->m_cycle_count, 0);
|
||||||
}
|
}
|
||||||
// yield?
|
Common::YieldCPU();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue