hujun260 commented on code in PR #16673:
URL: https://github.com/apache/nuttx/pull/16673#discussion_r2199632756


##########
sched/sched/sched_removereadytorun.c:
##########
@@ -139,14 +139,15 @@ void nxsched_remove_running(FAR struct tcb_s *tcb)
 {
   FAR dq_queue_t *tasklist;
   FAR struct tcb_s *nxttcb;
-  FAR struct tcb_s *rtrtcb = NULL;
   int cpu;
 
   /* Which CPU (if any) is the task running on?  Which task list holds the
    * TCB?
    */
 
-  DEBUGASSERT(tcb->task_state == TSTATE_TASK_RUNNING);
+  DEBUGASSERT(tcb->cpu == this_cpu() &&
+              tcb->task_state == TSTATE_TASK_RUNNING);
+
   cpu = tcb->cpu;
   tasklist = &g_assignedtasks[cpu];

Review Comment:
   Why not change g_assignedtasks into a node, just like g_delivertasks?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to