You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/10/22 19:14:10 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on issue #7393: Problems with priority inheritance.

pkarashchenko commented on issue #7393:
URL: https://github.com/apache/incubator-nuttx/issues/7393#issuecomment-1287888118

   @fjpanag what ARCH are you using and what is the `.config`?
   According to next code
   ```
   #ifndef CONFIG_SMP
   bool nxsched_add_readytorun(FAR struct tcb_s *btcb)
   {
     FAR struct tcb_s *rtcb = this_task();
     bool ret;
   
     /* Check if pre-emption is disabled for the current running task and if
      * the new ready-to-run task would cause the current running task to be
      * pre-empted.  NOTE that IRQs disabled implies that pre-emption is
      * also disabled.
      */
   
     if (rtcb->lockcount > 0 && rtcb->sched_priority < btcb->sched_priority)
       {
         /* Yes.  Preemption would occur!  Add the new ready-to-run task to the
          * g_pendingtasks task list for now.
          */
   
         nxsched_add_prioritized(btcb, &g_pendingtasks);
         btcb->task_state = TSTATE_TASK_PENDING;
         ret = false;
       }
   ```
   the `up_reprioritize_rtr` should not cause the context switch if current task locked the preemption. Are you using `CONFIG_SMP=y`?


-- 
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-unsubscribe@nuttx.apache.org

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