nuttx/sched/pthread
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 pthread: remove enter_critical_section in pthread_mutex 2025-01-12 22:30:35 +08:00
Make.defs pthread: remove enter_critical_section in pthread_mutex 2025-01-12 22:30:35 +08:00
pthread.h sched/mutex: add ticked lock version for mutex/rmutex 2025-04-03 20:13:55 +08:00
pthread_cancel.c
pthread_completejoin.c group: use tg_mutex to replace tg_joinlock 2025-01-19 17:08:32 +08:00
pthread_condbroadcast.c pthread_cond_wait: Use atomic_t to protect the waiter count 2025-01-20 23:55:26 +08:00
pthread_condclockwait.c pthread_cond_wait: Use atomic_t to protect the waiter count 2025-01-20 23:55:26 +08:00
pthread_condsignal.c pthread_cond_wait: Use atomic_t to protect the waiter count 2025-01-20 23:55:26 +08:00
pthread_condwait.c pthread_cond_wait: Use atomic_t to protect the waiter count 2025-01-20 23:55:26 +08:00
pthread_create.c Revert "sched/group: move task group into task_tcb_s to improve performance" 2025-12-23 10:24:42 +08:00
pthread_detach.c group: use tg_mutex to replace tg_joinlock 2025-01-19 17:08:32 +08:00
pthread_exit.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
pthread_findjoininfo.c group: use tg_mutex to replace tg_joinlock 2025-01-19 17:08:32 +08:00
pthread_getaffinity.c
pthread_getschedparam.c
pthread_join.c group: use tg_mutex to replace tg_joinlock 2025-01-19 17:08:32 +08:00
pthread_mutex.c sched/task: move lock to mhead scope 2025-11-01 22:52:07 +08:00
pthread_mutexconsistent.c
pthread_mutexdestroy.c
pthread_mutexinit.c Integrate nxmutex support fully into nxsem 2025-05-08 16:00:05 +08:00
pthread_mutextimedlock.c
pthread_mutextrylock.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
pthread_mutexunlock.c
pthread_release.c group: use tg_mutex to replace tg_joinlock 2025-01-19 17:08:32 +08:00
pthread_setaffinity.c
pthread_setschedparam.c
pthread_setschedprio.c
pthread_sigmask.c