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



##########
File path: include/nuttx/sched.h
##########
@@ -79,7 +79,7 @@
 
 /* Special task IDS.  Any negative PID is invalid. */
 
-#define NULL_TASK_PROCESS_ID       (pid_t)0

Review comment:
       should we change to IDLE_PROCESS_ID to algin with INVALID_PROCESS_ID?

##########
File path: drivers/syslog/syslog_device.c
##########
@@ -768,9 +768,10 @@ void syslog_dev_uninitialize(FAR struct syslog_channel_s 
*channel)
    * interrupt context.
    */
 
-  if (up_interrupt_context() || getpid() == 0)
+  if (up_interrupt_context() || getpid() == IDLE_TASK_PROCESS_ID)
     {
-      DEBUGASSERT(!up_interrupt_context() && getpid() != 0);
+      DEBUGASSERT(!up_interrupt_context() &&
+                  getpid() != IDLE_TASK_PROCESS_ID);

Review comment:
       ditto

##########
File path: drivers/syslog/syslog_device.c
##########
@@ -768,9 +768,10 @@ void syslog_dev_uninitialize(FAR struct syslog_channel_s 
*channel)
    * interrupt context.
    */
 
-  if (up_interrupt_context() || getpid() == 0)
+  if (up_interrupt_context() || getpid() == IDLE_TASK_PROCESS_ID)

Review comment:
       should call sched_idle_task here

##########
File path: drivers/syslog/syslog_device.c
##########
@@ -321,7 +321,7 @@ static int syslog_dev_outputready(FAR struct syslog_dev_s 
*syslog_dev)
 
   /* Cases (4) and (5) */
 
-  if (up_interrupt_context() || getpid() == 0)
+  if (up_interrupt_context() || getpid() == IDLE_TASK_PROCESS_ID)

Review comment:
       ditto




-- 
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-unsubscr...@nuttx.apache.org

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


Reply via email to