Commit graph

5 commits

Author SHA1 Message Date
ouyangxiangzhen
d9bbdeb6fe spinlock: Better recursive spinlock implementation.
This commit provided a better recursive spinlock implementation with
less memory-overhead and better performance.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-06-25 22:13:00 +08:00
liwenxiang1
81f27bd602 drivers/segger:Add config option to allow defining the macro as variable
we are using segger RTT protocol over shared memory for two core log/trace: one is NuttX another Linux/Windows. But the base address of shared memory can only be known at runtime, so we change SEGGER_RTT_UNCACHED_OFF from macro to global variable, and update to the correct g_segger_offset after the shared memory is initialized by:
g_segger_offset = (uintptr_t)ishmem - (uintptr_t)&_SEGGER_RTT;

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2025-06-16 14:56:06 +08:00
Jukka Laitinen
42b1ac90fb drivers/segger: Change SEGGER_RTT_LOCK into rspinlock
The SEGGER_RTT_LOCK needs to be recursive, otherwise system will
deadlock in SMP

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-06-15 00:07:26 +08:00
liwenxiang1
2fa5811f7c drivers/segger:Replace the included header file
The trunk branch fails to compile

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2025-06-15 00:07:26 +08:00
liwenxiang1
525fcb4a45 drivers/segger: move g_segger_lock to segger.c
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2025-06-15 00:07:26 +08:00