pkarashchenko commented on code in PR #9848:
URL: https://github.com/apache/nuttx/pull/9848#discussion_r1267498589


##########
sched/signal/sig_nanosleep.c:
##########
@@ -261,6 +262,11 @@ int clock_nanosleep(clockid_t clockid, int flags,
 {
   int ret;
 
+  if (clockid < CLOCK_REALTIME || clockid > CLOCK_BOOTTIME)
+    {
+      return EINVAL;
+    }

Review Comment:
   @xiaoxiang781216 @patacongo do you know what should have more "power" here, 
cancelation point or invalid parameter check? In other words, should these 
lines be placed here or after `enter_cancellation_point();`? Or in other words, 
should `clock_nanosleep()` call with invalid `clockid` be equivalent to 
`pthread_testcancel` or not?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to