hv: make thread status more accurate

1. Update thread status after switch_in/switch_out.
2. Add 'be_blocking' to represent the intermediate state during
sleep_thread and switch_out. After switch_out, the thread status
update to THREAD_STS_BLOCKED.

Tracked-On: #5057
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Reviewed-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Conghui Chen
2020-07-17 23:21:17 +08:00
committed by wenlingz
parent 312ea0b374
commit 2abbb99f6a
2 changed files with 14 additions and 12 deletions

View File

@@ -37,6 +37,7 @@ struct thread_object {
struct sched_control *sched_ctl;
thread_entry_t thread_entry;
volatile enum thread_object_state status;
bool be_blocking;
enum sched_notify_mode notify_mode;
uint64_t host_sp;