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/12/24 03:26:55 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5070: libc/semaphore:sem_init change defult protocol

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



##########
File path: libs/libc/semaphore/sem_init.c
##########
@@ -74,7 +74,7 @@ int nxsem_init(FAR sem_t *sem, int pshared, unsigned int value)
       /* Initialize to support priority inheritance */
 
 #ifdef CONFIG_PRIORITY_INHERITANCE
-      sem->flags            = 0;
+      sem->flags           |= PRIOINHERIT_FLAGS_DISABLE;

Review comment:
       change to:
   ```
   sem->flags           = PRIOINHERIT_FLAGS_DISABLE;
   ```
   or change `PRIOINHERIT_FLAGS_DISABLE` to `PRIOINHERIT_FLAGS_ENABLE`




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