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/06/11 07:13:12 UTC

[GitHub] [incubator-nuttx] anchao opened a new pull request, #6410: sched/mqueue: do sanity check if DEBUG_FEATURES is enabled

anchao opened a new pull request, #6410:
URL: https://github.com/apache/incubator-nuttx/pull/6410

   ## Summary
   
   sched/mqueue: do sanity check if DEBUG_FEATURES is enabled
   
   ## Impact
   
   ## Testing
   
   mq_send test (cycle count)
   
   ```
   393 origin
   361 (sched/mqueue: do sanity check if DEBUG_FEATURES is enabled)
   ```


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


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6410: sched/mqueue: do sanity check if DEBUG_FEATURES is enabled

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #6410:
URL: https://github.com/apache/incubator-nuttx/pull/6410#discussion_r894999684


##########
sched/mqueue/mq_sndinternal.c:
##########
@@ -73,17 +72,28 @@
  *
  ****************************************************************************/
 
-int nxmq_verify_send(FAR struct mqueue_inode_s *msgq, int oflags,
-                     FAR const char *msg, size_t msglen, unsigned int prio)
+#ifdef CONFIG_DEBUG_FEATURES
+int nxmq_verify_send(FAR FAR struct file *mq, FAR const char *msg,
+                     size_t msglen, unsigned int prio)
 {
+  FAR struct inode *inode = mq->f_inode;
+  FAR struct mqueue_inode_s *msgq;
+
+  if (!inode)

Review Comment:
   ```suggestion
     if (inode == NULL)
   ```
   



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


[GitHub] [incubator-nuttx] anchao commented on a diff in pull request #6410: sched/mqueue: do sanity check if DEBUG_FEATURES is enabled

Posted by GitBox <gi...@apache.org>.
anchao commented on code in PR #6410:
URL: https://github.com/apache/incubator-nuttx/pull/6410#discussion_r895002544


##########
sched/mqueue/mq_sndinternal.c:
##########
@@ -73,17 +72,28 @@
  *
  ****************************************************************************/
 
-int nxmq_verify_send(FAR struct mqueue_inode_s *msgq, int oflags,
-                     FAR const char *msg, size_t msglen, unsigned int prio)
+#ifdef CONFIG_DEBUG_FEATURES
+int nxmq_verify_send(FAR FAR struct file *mq, FAR const char *msg,
+                     size_t msglen, unsigned int prio)
 {
+  FAR struct inode *inode = mq->f_inode;
+  FAR struct mqueue_inode_s *msgq;
+
+  if (!inode)

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


[GitHub] [incubator-nuttx] acassis commented on a diff in pull request #6410: sched/mqueue: do sanity check if DEBUG_FEATURES is enabled

Posted by GitBox <gi...@apache.org>.
acassis commented on code in PR #6410:
URL: https://github.com/apache/incubator-nuttx/pull/6410#discussion_r895039313


##########
sched/mqueue/mq_rcvinternal.c:
##########
@@ -69,17 +68,27 @@
  *
  ****************************************************************************/
 
-int nxmq_verify_receive(FAR struct mqueue_inode_s *msgq,
-                        int oflags, FAR char *msg, size_t msglen)
+#ifdef CONFIG_DEBUG_FEATURES
+int nxmq_verify_receive(FAR struct file *mq, FAR char *msg, size_t msglen)

Review Comment:
   Initially I was thinking you forgot to declare this function when no DEBUG FEATURES as enabled, but I saw you did it at sched/mqueue/mqueue.h ! Very nice! ostest passed correctly!



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


[GitHub] [incubator-nuttx] acassis merged pull request #6410: sched/mqueue: do sanity check if DEBUG_FEATURES is enabled

Posted by GitBox <gi...@apache.org>.
acassis merged PR #6410:
URL: https://github.com/apache/incubator-nuttx/pull/6410


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