nuttx/sched
wangzhi16 a73ff585f1 sched/signal: fix the occasional issue where SIGCONT was not executed
In multi-core scenarios, a problem occurs: the target thread receives SIGCONT but does not execute them.

Further analysis reveals that in the sig_dispatch function, the target thread is placed in the readytorun queue only if the SIGCONT signal is sent and the target thread is in the TSTATE_TASK_STOPPED state. However, if the following conditions occur:

CPU0				CPU1
dispatch SIGSTOP
dispatch SIGCONT(check state)
				sched_suspend(set task_state = TSTATE_TASK_STOPPED)

This causes the target thread on CPU 1 to receive SIGCONT but not be placed in the readytorun queue, remaining in the stopped state.
Therefore, A flag is needed to indicate whether the SIGCONT action has been executed. At the same time, the critical section protection range of nxsig_stop_task needs to be expanded to prevent another thread from executing the SIGCONT logic during the execution of this function.

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2026-01-22 03:58:12 +08:00
..
addrenv sched/addrenv: replace critical section with spinlock for refs protection 2026-01-20 11:29:22 +08:00
clock sched/clock: [bugfix] should return -EINVAL when clock_id is invalid 2025-12-30 10:22:09 -03:00
environ libc/environ: add interrupt context check to getenv 2026-01-21 10:37:55 +08:00
event sched/event: Fix uninitialized need_switch flag issue in event_post() 2025-11-04 21:43:59 +08:00
group sched: move process ID from kernel to TLS for faster access 2026-01-20 22:33:45 +08:00
hrtimer sched/hrtimer: add option for list-based hrtimer management 2026-01-21 10:33:12 +08:00
init sched/init: use enum type for g_nx_initstate 2026-01-21 20:31:35 +08:00
instrument gprof: move gprof function from sched to libbuiltin/libgcc 2024-11-13 02:42:31 +08:00
irq sched/irq: Avoid same static function name in different files 2026-01-22 03:51:00 +08:00
misc sched/signal: Add support for disabling all signal functions 2026-01-18 08:24:13 -03:00
module libc/elf: rename modlib to libelf 2025-04-11 09:43:22 +08:00
mqueue sched: After nxsched_add_readytorun, change first parameter to up_switch_context to this_task() 2025-08-20 10:16:43 +08:00
paging sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
pthread sched/pthread: remove duplicate robust mutex checking logic 2026-01-21 10:12:22 +08:00
sched sched/signal: fix the occasional issue where SIGCONT was not executed 2026-01-22 03:58:12 +08:00
semaphore semaphore/sem_trywait.c: Remove redundancy leave_critical_section 2026-01-21 14:27:14 +08:00
signal sched/signal: Add support for disabling all signal functions 2026-01-18 08:24:13 -03:00
task sched/task: task_setup return path cleanup 2026-01-21 20:31:35 +08:00
timer sched/wdog: Replace periodcial timer with the wd_start_next. 2025-06-10 11:02:45 -03:00
tls sched/tls: fix thread ID initialization in tls_dup_info 2026-01-21 10:34:27 +08:00
wdog sched/wdog: Simplify the wdog expiration handling. 2026-01-10 17:30:25 +08:00
wqueue sched/wqueue: Replace spinlock/sched_lock with spin_lock_irqsave_nopreempt 2025-10-31 15:02:56 +08:00
CMakeLists.txt sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
Kconfig sched/hrtimer: add option for list-based hrtimer management 2026-01-21 10:33:12 +08:00
Makefile sched/hrtimer: Fix hrtimer compilation. 2026-01-08 22:26:11 +08:00