mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-28 21:38:01 +03:00
named_thread: fix bugs in std::forward usage
Fix few misused threads and other bugs.
This commit is contained in:
parent
d788b12a8e
commit
bbf52f3cea
5 changed files with 111 additions and 211 deletions
|
@ -2211,8 +2211,16 @@ thread_state thread_ctrl::state()
|
|||
{
|
||||
auto _this = g_tls_this_thread;
|
||||
|
||||
// Guard for recursive calls (TODO: may be more effective to reuse one of m_sync bits)
|
||||
static thread_local bool s_tls_exec = false;
|
||||
|
||||
// Drain execution queue
|
||||
_this->exec();
|
||||
if (!s_tls_exec)
|
||||
{
|
||||
s_tls_exec = true;
|
||||
_this->exec();
|
||||
s_tls_exec = false;
|
||||
}
|
||||
|
||||
return static_cast<thread_state>(_this->m_sync & 3);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue