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 2021/03/20 12:53:48 UTC

[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #3121: mm/heap: Move semaphore related declaration to private header

Ouss4 commented on a change in pull request #3121:
URL: https://github.com/apache/incubator-nuttx/pull/3121#discussion_r598108264



##########
File path: arch/risc-v/src/common/riscv_idle.c
##########
@@ -74,15 +74,6 @@ void up_idle(void)
    * sleep in a reduced power mode until an interrupt occurs to save power
    */
 
-  /* This is a kludge that I still don't understand.  The call to

Review comment:
       @xiaoxiang781216 did you try to remove the "kludge"?
   It's this part:
   ```
   #ifdef CONFIG_SCHED_WORKQUEUE
     irqstate_t flags = enter_critical_section();
     leave_critical_section(flags);
   #endif
   ```
   This also could be another thing that came from the MIPS port.  We had this bug in MIPS where an interrupt mask wasn't set correctly and disabling/enabling interrupts was just clearing that mask, now it's fixed.
   
   RISC-V chips are using a custom idle loop that doesn't include this kludge.

##########
File path: sched/init/nx_start.c
##########
@@ -762,12 +762,6 @@ void nx_start(void)
 
   DEBUGASSERT(this_cpu() == 0 && CONFIG_MAX_TASKS > CONFIG_SMP_NCPUS);
 
-  /* Take the memory manager semaphore on this CPU so that it will not be
-   * available on the other CPUs until we have finished initialization.
-   */
-
-  DEBUGVERIFY(kmm_trysemaphore());

Review comment:
       Taking this semaphore is not necessary?




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

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