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/11/18 18:16:17 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7618: mm/shm: Implement a generic utility API for creating / destroying shm mappings

xiaoxiang781216 commented on code in PR #7618:
URL: https://github.com/apache/incubator-nuttx/pull/7618#discussion_r1026747411


##########
mm/mm_gran/mm_granreserve.c:
##########
@@ -81,10 +83,21 @@ void gran_reserve(GRAN_HANDLE handle, uintptr_t start, size_t size)
 
       ngranules = ((end - start) >> priv->log2gran) + 1;
 
+      /* Must lock the granule allocator */
+
+      ret = gran_enter_critical(priv);
+      if (ret < 0)
+        {
+          return -ENOMEM;

Review Comment:
   return ret;



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