From 22233c643191f68b4f5a4d6ac0d4e8ab5316edc1 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Mon, 3 Oct 2022 10:56:09 +0200 Subject: [PATCH] Copy events when updating CPU tracking channels --- src/emu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/emu.c b/src/emu.c index bc6d459..4347c52 100644 --- a/src/emu.c +++ b/src/emu.c @@ -87,9 +87,7 @@ cpu_update_tracking_chan(struct ovni_chan *cpu_chan, struct ovni_ethread *th) /* Copy the state from the thread channel if needed */ if (th_enabled && cpu_enabled) { /* Both enabled: simply follow the same value */ - int st = chan_get_st(th_chan); - if (chan_get_st(cpu_chan) != st) - chan_set(cpu_chan, st); + chan_copy(cpu_chan, th_chan); } else if (th_enabled && !cpu_enabled) { /* Only thread enabled: disable CPU */ if (chan_is_enabled(cpu_chan))