SMP: Fix returning uninitialized variable in nxsched_add_readytorun()
Prior to this commit, doswitch is returned uninitialized if (task_state == TSTATE_TASK_ASSIGNED || task_state == TSTATE_TASK_RUNNING) && no context switch occurs && (cpu == me). Signed-off-by: Mingjie Shen <shen497@purdue.edu>
This commit is contained in:
parent
1bc50b53bb
commit
c40421c05b
@ -366,6 +366,7 @@ bool nxsched_add_readytorun(FAR struct tcb_s *btcb)
|
||||
|
||||
btcb->cpu = cpu;
|
||||
btcb->task_state = TSTATE_TASK_ASSIGNED;
|
||||
doswitch = false;
|
||||
}
|
||||
|
||||
/* All done, restart the other CPU (if it was paused). */
|
||||
|
Loading…
Reference in New Issue
Block a user