nuttx/sched/init
wangzhi16 678f69b32a Revert "sched/group: move task group into task_tcb_s to improve performance"
This reverts commit 29e50ffa73.

reason:
Placing the main thread and the gourd in the same memory block, and allocating and freeing memory simultaneously, presents the following two problems:

When the main thread creates a child thread and performs a detach operation, there is a possibility that the main thread may have exited, but the main thread's TCB (Transaction Control Block) may not have been released.

This could potentially cause the main thread's TCB to be double-freed. The core contradiction in this problem lies in binding the main thread's TCB (Trust Container Registry) and the group together. When releasing the main thread's TCB, an additional check is needed to ensure the main thread was the last to leave the group. If this check and the free operation are atomically guaranteed, the logic is sound, and double freeing won't occur. However, this atomicity cannot be completely guaranteed. If other free operations cause a block, problems still arise.

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2025-12-23 10:24:42 +08:00
..
CMakeLists.txt sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
init.h sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
Make.defs sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
nx_bringup.c sched/init/nx_bringup.c: Add support for CONFIG_INIT_NONE in a flat build 2025-08-31 18:38:36 +08:00
nx_smpstart.c sched: change nxsched_islocked_global to nxsched_islocked_tcb 2024-10-05 13:49:55 +08:00
nx_start.c Revert "sched/group: move task group into task_tcb_s to improve performance" 2025-12-23 10:24:42 +08:00