Fix cpu_thread::check_state() cpu_flag::temp support

This commit is contained in:
Eladash 2021-05-28 11:56:06 +03:00 committed by Ivan
parent 5f47730fc0
commit 6ff9aab2ca

View file

@ -693,8 +693,8 @@ bool cpu_thread::check_state() noexcept
// Atomically clean wait flag and escape // Atomically clean wait flag and escape
if (!(flags & (cpu_flag::exit + cpu_flag::ret + cpu_flag::stop))) if (!(flags & (cpu_flag::exit + cpu_flag::ret + cpu_flag::stop)))
{ {
// Check pause flags which hold thread inside check_state (ignore suspend on cpu_flag::temp) // Check pause flags which hold thread inside check_state (ignore suspend/debug flags on cpu_flag::temp)
if (flags & (cpu_flag::pause + cpu_flag::dbg_global_pause + cpu_flag::dbg_pause + cpu_flag::memory + (cpu_can_stop ? cpu_flag::suspend : cpu_flag::pause))) if (flags & (cpu_flag::pause + cpu_flag::memory) || (cpu_can_stop && flags & (cpu_flag::dbg_global_pause + cpu_flag::dbg_pause + cpu_flag::suspend)))
{ {
if (!(flags & cpu_flag::wait)) if (!(flags & cpu_flag::wait))
{ {