rt-thread/components/drivers/ipc
GuEe-GUI 9915dc66c1 ipc: fix recursive data queue locking on SMP
rt_data_queue_pop() holds the data queue spinlock while updating the ring
state, then calls rt_data_queue_len(). The length function tries to acquire
the same non-recursive spinlock again, causing an SMP deadlock when a pop
leaves the queue non-empty.

Add a private _data_queue_len_nolock() helper for callers which already hold
the queue lock. Keep the public rt_data_queue_len() protected by one spinlock
acquisition.

This does not change the public API, ABI, queue state transitions, low-water
mark wakeups, or event callback behavior.

Tested on a four-core Spacemit K1 with cyclic HDMI playback and by building the
SMP QEMU Virt64 RISC-V BSP with generic audio, Intel HDA and VirtIO Sound.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2026-08-03 09:43:57 +08:00
..
utest docs(utest):Add standardized documentation for IPC Completion Test 2025-11-26 22:53:01 +08:00
Kconfig fix: 在没有定义FINSH_USING_SYMTAB时编译报错以及IPC及finsh启用时自动选择必要的功能 2025-09-04 21:42:10 +08:00
SConscript utest: ipc: move from examples to components/drivers/ipc 2025-10-13 10:44:16 +08:00
completion_comm.c feat: add ISR safe completion API 2024-08-19 10:39:15 +08:00
completion_mp.c RT_TIMER_CTRL_SET_TIME only accept rt_tick_t, pass rt_tick_t instead int/rt_int32_t 2025-09-24 18:12:36 +08:00
completion_up.c RT_TIMER_CTRL_SET_TIME only accept rt_tick_t, pass rt_tick_t instead int/rt_int32_t 2025-09-24 18:12:36 +08:00
condvar.c cast to (rt_tick_t)RT_WAITING_FOREVER for explicit 2025-09-24 18:12:36 +08:00
dataqueue.c ipc: fix recursive data queue locking on SMP 2026-08-03 09:43:57 +08:00
pipe.c drivers/ipc: validate pipe ioctl args 2026-05-08 20:18:31 +08:00
ringblk_buf.c 如果申请空间不足,申请不到合适的空间,需要回收new_rbb 2024-05-27 11:28:45 +08:00
ringbuffer.c fix(drivers/ipc): correct rt_ringbuffer_peek to not consume data 2026-02-25 17:53:06 +08:00
waitqueue.c _rt_wqueue_wait use rt_tick_t 2025-09-24 18:12:36 +08:00
workqueue.c [wq][fix]工作队列默认使用C99标准实现遍历 2025-01-05 08:03:05 -05:00