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 2020/04/29 18:20:38 UTC

[GitHub] [incubator-nuttx] patacongo commented on a change in pull request #911: Use NuttX's signal set functions inside the OS.

patacongo commented on a change in pull request #911:
URL: https://github.com/apache/incubator-nuttx/pull/911#discussion_r417518969



##########
File path: include/nuttx/signal.h
##########
@@ -112,6 +112,68 @@ struct sigwork_s
 
 struct timespec;  /* Forward reference */
 
+/****************************************************************************
+ * Name: nxsig_ismember
+ *
+ * Description:
+ *   This function tests whether the signal specified by signo is a member
+ *   of the set specified by set.
+ *
+ * Input Parameters:
+ *   set - Signal set to test
+ *   signo - Signal to test for
+ *
+ * Returned Value:
+ *   1 (true), if the specified signal is a member of the set,
+ *   0 (OK or FALSE), if it is not, or
+ *  -1 (ERROR) if the signal number is invalid.

Review comment:
       Internal OS functions should never return -1 (ERROR), then should return a negated errno value.    In this case it should return -EINVAL:
   
   [EINVAL]
       The signo argument is not a valid signal number, or is an unsupported signal number. 




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org