yushuailong commented on code in PR #20768:
URL: https://github.com/apache/nuttx/pull/20768#discussion_r4306503099
##########
sched/pthread/pthread_create.c:
##########
@@ -459,6 +463,31 @@ int nx_pthread_create(pthread_trampoline_t trampoline, FAR
pthread_t *thread,
errout_with_tcb:
+ flags = enter_critical_section();
+
+#ifdef CONFIG_SCHED_SPORADIC
+ /* Stop sporadic scheduling before releasing its replenishment timers or
+ * the TCB referenced by those timers.
+ */
+
+ if (ptcb->sporadic != NULL)
+ {
+ DEBUGVERIFY(nxsched_stop_sporadic(ptcb));
+ }
+#endif
+
+ /* pthread_setup_scheduler() adds the TCB to the inactive task list.
+ * Remove it before releasing the TCB if a later initialization step
+ * failed.
+ */
+
+ if (scheduler_setup)
+ {
+ dq_rem((FAR dq_entry_t *)ptcb, list_inactivetasks());
Review Comment:
Thanks. I’ll wait for #20669 to be merged, then rebase this PR.
--
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]