fxysunshine commented on code in PR #2205: URL: https://github.com/apache/nuttx-apps/pull/2205#discussion_r1436688638
########## 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: Subtask in user_main need check the argc and argv parameter list, but there is no copy argv list and argc in pthread_create API. If need, should rework for user_main, but do not change anything if posix_spawn is used in kernel mode. static int user_main(int argc, char *argv[]) -- 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