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/03/25 17:52:17 UTC

[GitHub] [incubator-nuttx] GUIDINGLI opened a new pull request #5849: pm: remove unnecessary depends on OSINIT_OS_READY

GUIDINGLI opened a new pull request #5849:
URL: https://github.com/apache/incubator-nuttx/pull/5849


   ## Summary
   
   pm: remove unnecessary depends on OSINIT_OS_READY
   
   ## Impact
   
   pm
   
   ## Testing
   
   VELA


-- 
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



[GitHub] [incubator-nuttx] GUIDINGLI commented on pull request #5849: pm: remove unnecessary depends on OSINIT_OS_READY

Posted by GitBox <gi...@apache.org>.
GUIDINGLI commented on pull request #5849:
URL: https://github.com/apache/incubator-nuttx/pull/5849#issuecomment-1080455573


   @pkarashchenko 
   
   The pm_lock just a global value:
   #define pm_lock() nxsem_wait(&g_pmglobals.regsem);
   
   I hasn't meet error when do pm_register, but the code can be more easier, so comes this patch.
   And I guess someone who add the the judgement with OSINIT_OSREADY, maybe caused by:
   
   722   /* The OS is fully initialized and we are beginning multi-tasking */
   723 
   724   g_nx_initstate = OSINIT_OSREADY;
   
   But, I don't think we need this judgement, so remove it.
   


-- 
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



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #5849: pm: remove unnecessary depends on OSINIT_OS_READY

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #5849:
URL: https://github.com/apache/incubator-nuttx/pull/5849


   


-- 
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



[GitHub] [incubator-nuttx] pkarashchenko commented on pull request #5849: pm: remove unnecessary depends on OSINIT_OS_READY

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on pull request #5849:
URL: https://github.com/apache/incubator-nuttx/pull/5849#issuecomment-1080658056


   I'm more concerned about `sched_lock` / `sched_unlock`, but I see that those are the cases for else of `if (sem->semcount > 0)`, so we will not hit it on start-up because sem count is inited to 1. I just re-examined `nxsem_add_holder_tcb` case and that seems also to be safe because of `if (htcb->flink != NULL)` check.
   
   Ok. let's proceed with this change.


-- 
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



[GitHub] [incubator-nuttx] pkarashchenko commented on pull request #5849: pm: remove unnecessary depends on OSINIT_OS_READY

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on pull request #5849:
URL: https://github.com/apache/incubator-nuttx/pull/5849#issuecomment-1080467273


   @GUIDINGLI have you tested with `CONFIG_PRIORITY_INHERITANCE` enabled?


-- 
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



[GitHub] [incubator-nuttx] GUIDINGLI commented on pull request #5849: pm: remove unnecessary depends on OSINIT_OS_READY

Posted by GitBox <gi...@apache.org>.
GUIDINGLI commented on pull request #5849:
URL: https://github.com/apache/incubator-nuttx/pull/5849#issuecomment-1080651582


   > @GUIDINGLI have you tested with `CONFIG_PRIORITY_INHERITANCE` enabled?
   
   Don't need, because lots of people take sem before the OSINIT_OSREADY, 
   like mm_sem_take
   like group_setupidlefiles nx_open sem_take
   like ...
   
   And before the OSINIT_IDLELOOP state, we allow user call sem_wait.
   
    72 int nxsem_wait(FAR sem_t *sem)
    73 {
    74   FAR struct tcb_s *rtcb = this_task();
    75   irqstate_t flags;
    76   int ret = -EINVAL;
    77 
    78   /* This API should not be called from interrupt handlers & idleloop */
    79 
    80   DEBUGASSERT(sem != NULL && up_interrupt_context() == false);
    81   DEBUGASSERT(!OSINIT_IDLELOOP() || !sched_idletask());
    82 
   


-- 
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