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/07/08 19:17:44 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #4096: mm: Simplify the semaphore handling

xiaoxiang781216 commented on a change in pull request #4096:
URL: https://github.com/apache/incubator-nuttx/pull/4096#discussion_r666456666



##########
File path: mm/mm_heap/mm_sem.c
##########
@@ -77,29 +54,27 @@ void mm_seminitialize(FAR struct mm_heap_s *heap)
    */
 
   _SEM_INIT(&heap->mm_semaphore, 0, 1);
-
-  heap->mm_holder      = NO_HOLDER;
-  heap->mm_counts_held = 0;
 }
 
 /****************************************************************************
- * Name: mm_trysemaphore
+ * Name: mm_takesemaphore
  *
  * Description:
- *   Try to take the MM mutex.  This is called only from the OS in certain
+ *   Take the MM mutex.  This may be called from the OS in certain
  *   conditions when it is necessary to have exclusive access to the memory
  *   manager but it is impossible to wait on a semaphore (e.g., the idle
  *   process when it performs its background memory cleanup).

Review comment:
       Done.




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