kenneth.liu
cffaa514e2
components: libc: fix reset static variable unsolved in dlmodule_load_shared_object
...
[Problem Description]
In the dlmodule_load_shared_object function,
if a module loading fails once due to an unresolved symbol,
all subsequent attempts to load any module will fail.
The system becomes unable to load modules correctly until a reboot.
[Problem Analysis]
The root cause is that the variable unsolved is defined as static.
Static variables retain their value between function calls.
If a relocation error occurs, unsolved is set to RT_TRUE.
However, when the function returns with an error, the value of unsolved is not reset.
Consequently, on the next function call, unsolved remains RT_TRUE from the previous execution.
This causes the check if (unsolved) to trigger immediately (or after the loop),
forcing the function to return an error regardless of whether the current module is valid or not.
[Solution]
Reset the unsolved variable to RT_FALSE before returning the error code -RT_ERROR.
This ensures the variable is in a clean state for the next function call, preventing state leakage between invocations.
Signed-off-by: Liu Gui <kenneth.liu@sophgo.com >
2026-03-12 13:59:15 +08:00
hzt
1b39e04687
[libc/posix] Fix mq_send() to block when queue is full per POSIX standard
...
The POSIX mq_send() function currently passes timeout=0 to
rt_mq_send_wait_prio(), causing it to return immediately when the
queue is full instead of blocking as required by POSIX.1-2017.
This patch:
1. Changes mq_send() to use RT_WAITING_FOREVER for blocking behavior
2. Implements mq_timedsend() properly with timeout support
3. Fixes errno mapping for different error conditions
Reference: POSIX.1-2017 mq_send(3p):
"If the specified message queue is full, mq_send() shall block until
space becomes available to enqueue the message, or until mq_send()
is interrupted by a signal."
Fixes: https://github.com/RT-Thread/rt-thread/issues/11196
Signed-off-by: hzt <3061613175@qq.com >
2026-02-24 13:39:05 +08:00
Bernard Xiong
743b614875
[components][clock_time] Refactor time subsystem around clock_time ( #11111 )
...
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
doc_doxygen / doxygen_doc generate (push) Has been cancelled
doc_doxygen / deploy (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :components/sal.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled
ToolsCI / Tools (push) Has been cancelled
Weekly CI Scheduler / Trigger and Monitor CIs (push) Has been cancelled
Weekly CI Scheduler / Create Discussion Report (push) Has been cancelled
* [components][clock_time] Refactor time subsystem around clock_time
Introduce the clock_time core with clock source/event separation, high-resolution scheduling, and boot-time helpers, plus clock_timer adapters for timer peripherals.
Remove legacy ktime/cputime/hwtimer implementations and migrate arch and BSP time paths to the new subsystem while keeping POSIX time integration functional.
Update drivers, Kconfig/SConscript wiring, documentation, and tests; add clock_time overview docs and align naming to clock_boottime/clock_hrtimer/clock_timer.
* [components][clock_time] Use BSP-provided clock timer frequency on riscv64
* [risc-v] Use runtime clock timer frequency for tick and delays
* [bsp] Add clock timer frequency hooks for riscv64 boards
* [bsp] Update Renesas RA driver doc clock_timer link
* [bsp] Sync zynqmp-r5-axu4ev rtconfig after config refresh
* [bsp][rk3500] Update rk3500 clock configuration
* [bsp][hpmicro] Add rt_hw_us_delay hook and update board delays
* [bsp][stm32l496-st-nucleo] enable clock_time for hwtimer sample in ci
* [bsp][hpmicro] Fix rtconfig include scope for hpm6750evk
Move rtconfig.h include outside the ENET_MULTIPLE_PORT guard for hpm6750evk and hpm6750evk2 so configuration macros are available regardless of ENET settings.
* [bsp][raspi3] select clock time for systimer
* [bsp][hpm5300evk] Trim trailing blank line
* [bsp][hpm5301evklite] Trim trailing blank line
* [bsp][hpm5e00evk] Trim trailing blank line
* [bsp][hpm6200evk] Trim trailing blank line
* [bsp][hpm6300evk] Trim trailing blank line
* [bsp][hpm6750evk] Trim trailing blank line
* [bsp][hpm6750evk2] Trim trailing blank line
* [bsp][hpm6750evkmini] Trim trailing blank line
* [bsp][hpm6800evk] Trim trailing blank line
* [bsp][hpm6e00evk] Trim trailing blank line
* [bsp][nxp] switch lpc178x to gcc and remove mcx timer source
* [bsp][stm32] fix the CONFIG_RT_USING_CLOCK_TIME issue.
* [docs][clock_time] add clock time documentation
* [docs][clock_time] Update clock time subsystem documentation
- Update device driver index to use correct page reference
- Clarify upper layer responsibilities in architecture overview
- Update README to describe POSIX/libc, Soft RTC, and device driver usage
- Refine architecture diagram with improved layout and color scheme
- Remove obsolete clock_timer.md file
* [kernel][utest] Trim trailing space
* [clock_time] Fix hrtimer wrap handling
* [clock_time] fix the static rt_inline issue
* [clock_time] fix the rt_clock_hrtimer_control result issue
2026-01-31 17:44:27 +08:00
milo
3ca5cd53f5
[fix] fix normalization issue of mktime and timegm
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :components/sal.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
Weekly CI Scheduler / Trigger and Monitor CIs (push) Has been cancelled
Weekly CI Scheduler / Create Discussion Report (push) Has been cancelled
2026-01-17 19:12:40 -05:00
laidene
d09135f76b
[components][libc][posix][libdl] Optimization: Redundant calculations in a for loop
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :components/sal.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
Weekly CI Scheduler / Trigger and Monitor CIs (push) Has been cancelled
Weekly CI Scheduler / Create Discussion Report (push) Has been cancelled
2025-12-18 13:57:07 +08:00
lct1001
170069b292
components:libc:cplusplus:os/utest:Some comments have been initially added.
...
ToolsCI / Tools (push) Has been cancelled
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
doc_doxygen / doxygen_doc generate (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :components/sal.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
doc_doxygen / deploy (push) Has been cancelled
Weekly CI Scheduler / Trigger and Monitor CIs (push) Has been cancelled
Weekly CI Scheduler / Create Discussion Report (push) Has been cancelled
Some comments have been initially added as a bignner task.
components/libc/cplusplus/os/cxx_Semaphore.cpp
components/libc/cplusplus/os/cxx_Thread.cpp
components/libc/cplusplus/utest/tc_atomic.cpp
components/libc/cplusplus/utest/tc_smartptr.cpp
components/libc/cplusplus/utest/tc_thread.cpp
Signed-off-by:Liu Chengtao<2739960959@qq.com >
2025-12-12 14:00:36 +08:00
GuEe-GUI
39a52cdad2
[LIBC/AIO] Set the AIO work stack size default.
...
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :components/sal.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / Infineon/psoc6-pioneerkit_modus (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / airm2m/air105 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / allwinner/d1 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / allwinner/d1s (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / amebaz (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / avr32uc3b0 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / bf533 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / bouffalo_lab/bl61x (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / bouffalo_lab/bl808/d0 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / bouffalo_lab/bl808/lp (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / bouffalo_lab/bl808/m0 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / ck802 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / core-v-mcu/core-v-cv32e40p (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / essemi/es32f0654 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / essemi/es32f365x (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / fm33lc026 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / ft2004 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / hc32l136 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / hk32/hk32f030c8-mini (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / imx/imx6ull-smart (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / imxrt/imxrt1170-nxp-evk/m7 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / juicevm (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / lpc43xx/M0 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / lpc43xx/M4 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / lpc54608-LPCXpresso (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / lpc824 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / m16c62p (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / microblaze (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / mini4020 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / mm32f327x (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / mm32l07x (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / nios_ii (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / nuclei/nuclei_fpga_eval (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / nv32f100x (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / phytium/aarch32 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / pic32ethernet (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / raspberry-pi/raspi2 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / rockchip/rk2108 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / rv32m1_vega/ri5cy (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / rx (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / samd21 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / sep6200 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / synopsys/boards (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / tae32f5300 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / taihu (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / thead-smart (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / ti/c28x/tms320f28379d (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / tkm32F499 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / tms320c6678 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / upd70f3454 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / w60x (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / wch/arm/ch579m (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / wch/risc-v/ch32v103r-evt (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / wch/risc-v/ch569w-evt (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / wh44b0 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / x86 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / xplorer4330/M0 (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / yichip/yc3121-pos (push) Has been cancelled
manual_trigger_scons_fail_bsp_all.yml / yichip/yc3122-pos (push) Has been cancelled
Signed-off-by: GuEe-GUI <2991707448@qq.com >
2025-12-02 09:50:52 +08:00
Copilot
30e1e5e9dc
Reorganize Group names in build system for clarity and IDE integration #10923
ToolsCI / Tools (push) Has been cancelled
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
doc_doxygen / doxygen_doc generate (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :components/sal.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
doc_doxygen / deploy (push) Has been cancelled
Weekly CI Scheduler / Trigger and Monitor CIs (push) Has been cancelled
Weekly CI Scheduler / Create Discussion Report (push) Has been cancelled
2025-11-16 11:40:53 +08:00
ChengyangMa
5b87ac609e
[libc][syscall] add detailed function comments for memory management
2025-11-07 20:52:08 -05:00
Liu Changjie
8153fe5fd9
[libc][syscalls] 新手PR任务_增加文件操作相关函数的文档注释
2025-11-07 20:50:13 -05:00
Chen Wang
c1363c77d6
utest: Improve the strings displayed in the menu
...
Use "Test" instead of "Unit Testcases" to make string shorter.
Use uppercase to make it look more eye-catching.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com >
2025-10-16 18:34:43 +08:00
Chen Wang
e8d3d0fca4
utest: move cpp from examples to components/libc/cplusplus
...
ToolsCI / Tools (push) Has been cancelled
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
doc_doxygen / doxygen_doc generate (push) Has been cancelled
doc_doxygen / deploy (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled
Also update the case names to compatible with naming rules.
Signed-off-by: Chen Wang <unicorn_wang@outlook.com >
2025-10-15 15:28:58 +08:00
Yonggang Luo
517e5b132b
compute ns with rt_int64_t instead of int64_t in ctime.c
2025-10-13 21:44:01 +08:00
loremmoqi
17a796af24
fix(stdio): ensure compatibility with newlib <3.4.0 by handling removed __sdidinit ( #10791 )
2025-10-13 11:45:22 +08:00
Yonggang Luo
66b2bcc080
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
Yonggang Luo
78dfa1fd9a
Trim trailing spaces of components/libc/posix/io/poll/poll.c
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
2025-09-24 18:12:36 +08:00
ChenRuiwei
f9564d4ee0
[pthreads] Fix pthread_cond_timedwait lacks timeout wakeup
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
AutoTestCI / components/cpp11 (push) Has been cancelled
AutoTestCI / kernel/atomic (push) Has been cancelled
AutoTestCI / kernel/atomic/riscv64 (push) Has been cancelled
AutoTestCI / kernel/atomic_c11 (push) Has been cancelled
AutoTestCI / kernel/atomic_c11/riscv64 (push) Has been cancelled
AutoTestCI / kernel/device (push) Has been cancelled
AutoTestCI / kernel/ipc (push) Has been cancelled
AutoTestCI / kernel/irq (push) Has been cancelled
AutoTestCI / kernel/mem (push) Has been cancelled
AutoTestCI / kernel/mem/riscv64 (push) Has been cancelled
AutoTestCI / kernel/thread (push) Has been cancelled
AutoTestCI / kernel/timer (push) Has been cancelled
AutoTestCI / rtsmart/aarch64 (push) Has been cancelled
AutoTestCI / rtsmart/arm (push) Has been cancelled
AutoTestCI / rtsmart/riscv64 (push) Has been cancelled
AutoTestCI / components/utest (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
2025-07-25 15:35:39 +08:00
Codeman-1999
7c0fed5d68
[components/libc] add comments for some pthread functions. #10423
2025-07-24 09:36:31 +08:00
蒙蒙plus
926cbb31f6
修复DFS_USING_POSIX启用时 修正IARVersion导入路径
2025-07-14 13:09:08 +08:00
lingfengPeng
29a06142c5
fix dangling pointer in component pthread and dfs_elm ( #9976 )
...
* [components/libc/posix][pthreads]fix the risk of dangling pointer
* [components][dfs][dfs_elm]:fix risk of dangling pointer, unmount the temp driver then free the temp FATFS in dfs_elm_mkfs.
2025-03-11 10:48:29 +08:00
kenneth.liu
4940bb1051
components: libc: fix pointer-to-integer cast warnings and address truncation
...
[Problem Description]
1. When enabling RT_USING_MODULE=y, compilation warnings occur:
dlelf.c:386:27: warning: cast from pointer to integer of different size
dlelf.c:398:25: warning: cast from pointer to integer of different size
dlelf.c:408:24: warning: cast from pointer to integer of different size
2. On RV64 architectures (e.g. Sophgo SG2042 with RISC-V Sv39 and 40-bit physical addressing),
dlsym may fail when accessing addresses beyond 32-bit range.
[Root Cause]
In dlmodule_load_relocated_object() and dlmodule_symbol_find(),
pointer is cast to rt_uint32_t which truncates:
| rt_ubase_t rodata_addr = (rt_uint32_t)ptr;
This causes:
- Warnings on 64-bit systems (pointer width > 32-bit)
- Actual address truncation on RV64 when physical address exceeds 32-bit
[Solution]
Replace rt_uint32_t with architecture-adaptive rt_ubase_t:
| rt_ubase_t rodata_addr = (rt_ubase_t)ptr;
The rt_ubase_t is defined in include/rttypes.h as:
| #ifdef ARCH_CPU_64BIT
| typedef rt_uint64_t rt_ubase_t;
| #else
| typedef rt_uint32_t rt_ubase_t;
| #endif
This ensures correct width casting for both 32/64-bit architectures.
Signed-off-by: Liu Gui <kenneth.liu@sophgo.com >
2025-02-22 14:16:00 -05:00
kenneth.liu
a5b26bb588
components: libc: fix array overflow in rt_object name assignment
...
AutoTestCI / components/cpp11 (push) Waiting to run
AutoTestCI / kernel/atomic (push) Waiting to run
AutoTestCI / kernel/atomic/riscv64 (push) Waiting to run
AutoTestCI / kernel/atomic_c11 (push) Waiting to run
AutoTestCI / kernel/atomic_c11/riscv64 (push) Waiting to run
AutoTestCI / kernel/device (push) Waiting to run
AutoTestCI / kernel/ipc (push) Waiting to run
AutoTestCI / kernel/irq (push) Waiting to run
AutoTestCI / kernel/mem (push) Waiting to run
AutoTestCI / kernel/mem/riscv64 (push) Waiting to run
AutoTestCI / kernel/thread (push) Waiting to run
AutoTestCI / kernel/timer (push) Waiting to run
AutoTestCI / rtsmart/aarch64 (push) Waiting to run
AutoTestCI / rtsmart/arm (push) Waiting to run
AutoTestCI / rtsmart/riscv64 (push) Waiting to run
AutoTestCI / components/utest (push) Waiting to run
RT-Thread BSP Static Build Check / ESP32C3 (push) Waiting to run
RT-Thread BSP Static Build Check / Infineon_TI_microchip (push) Waiting to run
RT-Thread BSP Static Build Check / RT-Thread Online Packages (STM32F407 RT-Spark) (push) Waiting to run
RT-Thread BSP Static Build Check / RTduino/Arduino Libraries (Raspberry Pico) (push) Waiting to run
RT-Thread BSP Static Build Check / RTduino/Arduino Libraries (STM32F412 Nucleo) (push) Waiting to run
RT-Thread BSP Static Build Check / aarch64 (push) Waiting to run
RT-Thread BSP Static Build Check / gd32_n32_apm32 (push) Waiting to run
RT-Thread BSP Static Build Check / hpmicro (push) Waiting to run
RT-Thread BSP Static Build Check / i386-unknown (push) Waiting to run
RT-Thread BSP Static Build Check / llvm-arm (push) Waiting to run
RT-Thread BSP Static Build Check / mips (push) Waiting to run
RT-Thread BSP Static Build Check / nordic(yml) (push) Waiting to run
RT-Thread BSP Static Build Check / nuvoton (push) Waiting to run
RT-Thread BSP Static Build Check / nxp_renesas (push) Waiting to run
RT-Thread BSP Static Build Check / others_at32_hc32_ht32 (push) Waiting to run
RT-Thread BSP Static Build Check / riscv-none (push) Waiting to run
RT-Thread BSP Static Build Check / riscv64-unknown (push) Waiting to run
RT-Thread BSP Static Build Check / simulator (push) Waiting to run
RT-Thread BSP Static Build Check / stm32_f2_f4 (push) Waiting to run
RT-Thread BSP Static Build Check / stm32_f7_g0_h7_mp15_u5_h5_wb5 (push) Waiting to run
RT-Thread BSP Static Build Check / stm32l4_f0_f1 (push) Waiting to run
BSP compilation with more drivers / BSP Compilation with More Drivers (push) Waiting to run
pkgs_test / change (push) Has been skipped
[Problem Description]
When assigning name to rt_object, strncpy() uses size equal to RT_NAME_MAX,
which causes missing null-terminator and overflows into adjacent 'type' field.
This corruption leads to unexpected system behavior.
[Problem Analysis]
The rt_object structure defines:
| char name[RT_NAME_MAX] | -> buffer
| rt_uint8_t type | -> adjacent field
Original code calculates size as:
size = end - first + 1;
if (size > RT_NAME_MAX) size = RT_NAME_MAX;
When size equals RT_NAME_MAX, strncpy() will copy exactly RT_NAME_MAX bytes
without adding terminating '\0', causing two issues:
1. name buffer is not null-terminated
2. The implicit null-byte writes beyond name[] into type field
[Solution]
Change boundary check from:
if (size > RT_NAME_MAX) size = RT_NAME_MAX;
to:
if (size >= RT_NAME_MAX) size = RT_NAME_MAX - 1;
This ensures:
1. Always leaves space for null-terminator
2. Prevents overflow into type field
3. Maintains maximum valid name length (RT_NAME_MAX-1 + '\0')
Signed-off-by: Liu Gui <kenneth.liu@sophgo.com >
2025-02-20 22:38:06 -05:00
godmial
24cf724899
[include] RT_USING_MUSLLIBC结构体报错的bug ( #9834 )
...
解决了gd32470z-lckfb libc_dirent结构体报错的bug
2024-12-27 15:22:08 +08:00
Meco Man
a992226863
[libc] uncomment wcwidth for win32
2024-12-24 13:42:04 +08:00
Meco Man
7772d4619a
[klibc] format code
2024-12-21 14:57:17 -05:00
ligr
1499dbda00
[components][libc/io]add comments for timer fd APIs.
2024-12-18 21:07:42 -05:00
wycwyhwyq
6876cb6f73
[components] When rtc is not enabled, use other clock sources instead ( #9747 )
...
When rtc is not enabled, use other clock sources instead
Signed-off-by: wycwyhwyq <5f20.6d9b@gmail.com >
2024-12-06 20:13:03 +08:00
ligr
dd709c1cea
[components/libc/posix]add comments for thread local storage APIs.
2024-11-21 21:46:47 -05:00
ligr
bb0a1ea453
[components/libc/posix]fix the problem that it doesn't check if barrier still in use and dosen't destory the mutex either.
2024-11-21 19:22:44 -05:00
ligr
0bac8c4f90
[components/libc/posix]fix the errors that assigning an integer to a pointer and always return EINVAL.
2024-11-21 19:22:44 -05:00
ligr
79324c0b4c
[components/libc/posix]add comments for barrier APIs.
2024-11-21 19:22:44 -05:00
ligr
b023c15256
[components/libc/posix]add comments for rwlock APIs.
2024-11-19 18:26:16 -05:00
ligr
c1c7959bdb
[components/libc/posix]add comments for condition variable APIs.
2024-11-19 18:26:16 -05:00
ligr
07c8b571ce
[components/libc/posix]add comments for mutex APIs.
2024-11-18 19:21:02 -05:00
rcitachi
d9c16efe8f
Modify the position of libc_rent definition
2024-11-17 11:59:37 -05:00
ligr
5e8602c6e0
[components/libc/posix][pthreads]add comments for thread APIs of pthread.
2024-11-16 11:52:57 -05:00
ligr
f0934630c4
[libc] add comments for libdl APIs.
2024-11-13 07:58:34 +08:00
rcitachi
7c27319521
[libc] modify function names to resolve naming conflicts
2024-11-01 18:44:16 -04:00
yandld
635e16a8d5
[libc] 修复 ctime()死机问题
2024-09-03 18:13:09 -04:00
zx568073531
b19672ccc1
修复TLS内存申请没有初始化问题
2024-08-25 01:36:31 -04:00
SeliverWang
f7f0afe03e
修复TLS申请内存后没有初始化问题
2024-08-25 01:36:31 -04:00
Z8MAN8
1d646bcf56
Add RT_USING_RTC conditional compilation protection in ctimer.c
...
Analysis: There is still an omission in the preprocessing control of
_control_rtc in 24b0a81 ("Add RT_USING_RTC conditional
compilation protection in ctimer.c")
Solution: Add RT_USING_RTC preprocessing control to missing
_control_rtc
Signed-off-by: Shicheng Chu <1468559561@qq.com >
2024-08-12 15:56:17 +08:00
Z8MAN8
24b0a8174f
Add RT_USING_RTC conditional compilation protection in ctimer.c
...
Analysis: RT_USING_RTC preprocessing is used in 47cd52d ("修复不
使能 RT_USING_DEVICE 时编译报错") to control the reference of
rtdevice.h, as well as the implementation and call of _control_rtc,
but there are some omissions.
Solution: Add RT_USING_RTC preprocessing control to missing
_control_rtc
Signed-off-by: Shicheng Chu <1468559561@qq.com >
Reviewed-by: Chen Wang <unicorn_wang@outlook.com >
2024-08-11 14:37:36 +08:00
马龙伟
47cd52d162
修复不使能 RT_USING_DEVICE 时编译报错 ( #9145 )
...
* 修复不使能 RT_USING_DEVICE 时编译报错
* 删除 ctime.c 中多余引用
2024-08-04 09:56:47 +08:00
Rui
3b1d4e9222
fix Compilation error in "driver.c", "completion_up.c", "syslog.c" and "dlmodule.c". ( #9093 )
2024-06-26 23:25:23 +08:00
zms123456
22b5e5fd7b
[components][ktime]support period ktime timeout and multiple ktimer_hrtimer ( #8972 )
...
* support period time
* enable multiple ktimer
* mv set delay_cnt to hrtimer_start
* add ktime debug info
* change current_irq_begin to local var
* fix bug: setting current timer and setting timeout in driver aren't atomicly
* create->init
* refactoring ktime
2024-06-23 22:08:54 +08:00
latercomer
d58c29d23e
除了bsp之外的Kconfig使用rsource替代source
2024-06-20 14:40:42 +08:00
zhangyan
842b555358
[bsp/phytium]c++支持,gpio,qspi驱动修改 ( #9059 )
...
* GPIO驱动与QSPI驱动适配
* C++支持
* update
---------
Co-authored-by: 张衍 <zhangyan1491@phytium.com.cn >
2024-06-16 15:42:37 +08:00
atwww
b421b4e1f4
修复C++11 thread_local对象析构函数与实际内存释放动作顺序相反问题
2024-05-11 13:50:02 -04:00
Shell
2c9b7c10b9
[kernel] add rt_thread_close()
...
* [thread] Add rt_thread_close()
This patch introduces a new function `rt_thread_close()` to enhances the
usability and maintainability by providing a dedicated mechanism for
closing threads.
- A new function `rt_thread_close()` is added to the API, providing a
standardized approach for closing threads.
- The `rt_thread_close()` function removes a thread from the thread
queue, updates its status to indicate closure, and performs the thread
timer detaching which is a embedded timer in thread object.
- Additionally, the `rt_thread_detach()` function is modified to utilize
`rt_thread_close()` internally, streamlining the thread detachment
process.
Signed-off-by: Shell <smokewood@qq.com >
2024-05-01 00:49:09 -04:00