mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
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
5ef9a003c4
commit
95c5426a18
1 changed files with 1 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue