patacongo commented on PR #18408: URL: https://github.com/apache/nuttx/pull/18408#issuecomment-3934281140
The initial thread is never destroyed: Prior to going into multi-tasking mode, it does single-thread system bringup. Then when the operating system is initialized and threading is start, it gets renamed the IDLE loop. It just jumps into the IDLE loop with the lowest possible priority. When nothing else is running, the IDLE thread runs. This is for the life of the system. Greg ________________________________ From: Mateusz Szafoni ***@***.***> Sent: Friday, February 20, 2026 12:17 AM To: apache/nuttx ***@***.***> Cc: patacongo ***@***.***>; Review requested ***@***.***> Subject: Re: [apache/nuttx] boards: Simplify NuttX initialization (PR #18408) [https://avatars.githubusercontent.com/u/6563055?s=20&v=4]raiden00pl left a comment (apache/nuttx#18408)<https://github.com/apache/nuttx/pull/18408#issuecomment-3932346301> The only thing that puzzles me about this change is how the "init thread" aligns with safety standards. This mechanism creates a thread that is later destroyed, which isn't entirely desirable for safety critical applications. But on the other hand, "init thread" is part of the system initialization process, and during the initialization phase, dynamic memory allocation and deallocation is tolerated. The goal here is that in the event of a board initialization failure, the system is in a known safe state. So, I think it still fits within the acceptable use of dynamic memory for safety critical apps, but not sure. Ultimately, there's always BOARDIOC_FINALINIT option, which allows users to get rid of the "init thread" and perform initialization in "main", just like old BOARDIOC_INIT. — Reply to this email directly, view it on GitHub<https://github.com/apache/nuttx/pull/18408#issuecomment-3932346301>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABFUG6SSZNLV5ZRQJYZG3QD4M27LHAVCNFSM6AAAAACVUO2FE6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTSMZSGM2DMMZQGE>. You are receiving this because your review was requested.Message ID: ***@***.***> -- 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]
