CPUThread.cpp: Fix cpu_flag::pending reset
This commit is contained in:
@@ -775,14 +775,12 @@ bool cpu_thread::check_state() noexcept
|
|||||||
cpu_counter::add(this);
|
cpu_counter::add(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr auto pending_and_temp = (cpu_flag::pending + cpu_flag::temp);
|
if (cpu_can_stop && state0 & cpu_flag::pending)
|
||||||
|
|
||||||
if ((state0 & pending_and_temp) == cpu_flag::pending)
|
|
||||||
{
|
{
|
||||||
// Execute pending work
|
// Execute pending work
|
||||||
cpu_work();
|
cpu_work();
|
||||||
|
|
||||||
if ((state1 ^ state) - pending_and_temp)
|
if ((state1 ^ state) - cpu_flag::pending)
|
||||||
{
|
{
|
||||||
// Work could have changed flags
|
// Work could have changed flags
|
||||||
// Reset internal flags as if check_state() has just been called
|
// Reset internal flags as if check_state() has just been called
|
||||||
|
|||||||
Reference in New Issue
Block a user