xiaoxiang781216 commented on code in PR #2205:
URL: https://github.com/apache/nuttx-apps/pull/2205#discussion_r1434279514
##########
testing/ostest/signest.c:
##########
@@ -180,10 +180,10 @@ static int waiter_main(int argc, char *argv[])
/* Just exit, the system should clean up the signal handlers */
g_waiter_running = false;
- return EXIT_SUCCESS;
+ return NULL;
}
-static int interfere_main(int argc, char *argv[])
+static void *interfere_main(void *arg)
Review Comment:
```suggestion
static FAR void *interfere_main(FAR void *arg)
```
##########
testing/ostest/ostest_main.c:
##########
@@ -680,9 +715,19 @@ int main(int argc, FAR char **argv)
/* Verify that we can spawn a new task */
+#ifdef CONFIG_BUILD_KERNEL
+ posix_spawnattr_init(&attr);
+ param.sched_priority = PRIORITY;
+ posix_spawnattr_setschedparam(&attr, ¶m);
+ posix_spawnattr_setstacksize(&attr, STACKSIZE);
+ status = posix_spawn(&result, arg[0], NULL, &attr,
+ (char * const *)arg, NULL);
+ if (status != 0)
+#else
result = task_create("ostest", PRIORITY, STACKSIZE, user_main,
Review Comment:
why not always use pthread_create
##########
testing/ostest/pthread_exit.c:
##########
@@ -56,7 +56,7 @@ static void *pthread_exit_thread(FAR void *parameter)
return NULL;
}
-static int pthread_exit_main(int argc, char **argv)
+static void *pthread_exit_main(FAR void *arg)
Review Comment:
```suggestion
static FAR void *pthread_exit_main(FAR void *arg)
```
##########
testing/ostest/sighand.c:
##########
@@ -128,7 +128,7 @@ static void wakeup_action(int signo, siginfo_t *info, void
*ucontext)
}
}
-static int waiter_main(int argc, char *argv[])
+static void *waiter_main(FAR void *arg)
Review Comment:
```suggestion
static FAR void *waiter_main(FAR void *arg)
```
##########
testing/ostest/signest.c:
##########
@@ -118,7 +118,7 @@ static void waiter_action(int signo)
sem_post(&g_sem_signal_finish);
}
-static int waiter_main(int argc, char *argv[])
+static void *waiter_main(void *arg)
Review Comment:
```suggestion
static FAR void *waiter_main(FAR void *arg)
```
--
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]