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/10/18 09:51:44 UTC

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

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


##########
drivers/input/tsc2007.c:
##########
@@ -1230,11 +1230,11 @@ int tsc2007_register(FAR struct i2c_master_s *dev,
   nxsem_init(&priv->devsem,  0, 1); /* Initialize device structure semaphore */
   nxsem_init(&priv->waitsem, 0, 0); /* Initialize pen event wait semaphore */
 
-  /* The event wait semaphore is used for signaling and, hence, should not
-   * have priority inheritance enabled.
+  /* The event dev semaphore is used for lock, hence,
+   * should have priority inheritance enabled.
    */
 
-  nxsem_set_protocol(&priv->waitsem, SEM_PRIO_NONE);
+  nxsem_set_protocol(&priv->devsem, SEM_PRIO_INHERIT);

Review Comment:
   revert the change, let's do all change in https://github.com/apache/incubator-nuttx/pull/7344



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