mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 05:21:25 +12:00
named_thread: implement "default" event loop
Fixup "sleepy" thread at startup on Windows. Permit threads which lack operator()() overload.
This commit is contained in:
parent
29e7eda887
commit
3aaa0172d5
3 changed files with 22 additions and 8 deletions
|
@ -2336,16 +2336,14 @@ bool thread_base::join(bool dtor) const
|
|||
|
||||
if (i > 20 && Emu.IsStopped())
|
||||
{
|
||||
stamp0 = __rdtsc();
|
||||
atomic_wait_engine::raw_notify(0, get_native_id());
|
||||
stamp0 = __rdtsc() - stamp0;
|
||||
warn = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (warn)
|
||||
{
|
||||
sig_log.error(u8"Thread [%s] is too sleepy. Took %.3fµs to wake it up!", *m_tname.load(), stamp0 / (utils::get_tsc_freq() / 1000000.));
|
||||
sig_log.error(u8"Thread [%s] is too sleepy. Took %.3fµs to wake it up!", *m_tname.load(), (__rdtsc() - stamp0) / (utils::get_tsc_freq() / 1000000.));
|
||||
}
|
||||
|
||||
return (m_sync & 3) == 3;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue