nuttx/sched/task
wangzhi16 31e562b10f 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-21 08:53:46 -03:00
..
CMakeLists.txt binfmt:use crt0 inside of starthook 2025-04-09 23:07:29 +08:00
exit.c sched: add header irq.h to exit.c 2024-11-04 11:07:40 -03:00
Make.defs binfmt:use crt0 inside of starthook 2025-04-09 23:07:29 +08:00
spawn.h sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
task.h task: merge nxtask_setup_name() before create_stack 2024-10-07 15:47:13 +08:00
task_activate.c sched: After nxsched_add_readytorun, change first parameter to up_switch_context to this_task() 2025-08-20 10:16:43 +08:00
task_argvstr.c Rename group_argvstr to nxtask_argvstr 2024-10-10 23:13:37 +08:00
task_cancelpt.c sched/event: Add nxevent_wait_irq() to handle the task cancel 2025-10-31 19:56:32 -03:00
task_create.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
task_delete.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
task_execve.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
task_exit.c arch: unify the scheduling information of task_exit 2025-09-25 16:40:23 +08:00
task_exithook.c sched: Replace direct semaphore value access with nxsem_get_value 2025-04-07 16:29:57 +08:00
task_fork.c Revert "sched/group: move task group into task_tcb_s to improve performance" 2025-12-21 08:53:46 -03:00
task_getgroup.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
task_getpid.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
task_getppid.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
task_gettid.c sched/gettid: Move thread ID to TLS 2025-04-08 22:53:10 +08:00
task_init.c Revert "sched/group: move task group into task_tcb_s to improve performance" 2025-12-21 08:53:46 -03:00
task_join.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
task_posixspawn.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
task_prctl.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
task_recover.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
task_reparent.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
task_restart.c sched: Remove unnecessary affinity restriction & restoration over smp calls 2025-08-20 10:16:43 +08:00
task_setup.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
task_spawn.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
task_spawnparms.c fs/vfs: Separate file descriptors from file descriptions 2025-06-12 18:12:42 +08:00
task_start.c binfmt:use crt0 inside of starthook 2025-04-09 23:07:29 +08:00
task_terminate.c sched: Remove unnecessary affinity restriction & restoration over smp calls 2025-08-20 10:16:43 +08:00