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
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
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
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
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
ligr
1499dbda00
[components][libc/io]add comments for timer fd APIs.
2024-12-18 21:07:42 -05: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
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
zx568073531
b19672ccc1
修复TLS内存申请没有初始化问题
2024-08-25 01:36:31 -04:00
SeliverWang
f7f0afe03e
修复TLS申请内存后没有初始化问题
2024-08-25 01:36:31 -04: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
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
Troy
1d2fde8d73
Add comments for all functions in components/libc/posix/ipc/mqueue.c
2024-04-30 01:08:36 -04:00
Troy
946dd264ed
Add comments for all functions in components/libc/posix/io/termios/termios.c
2024-04-26 23:13:27 -04:00
Troy
98a234d430
Add some comments in components/libc/posix/ipc/semaphore.c ( #8848 )
2024-04-24 05:46:43 +08:00
atwww
2cc88b6cf5
修复POSIX线程本地存储寻找posix线程句柄时的逻辑错误 ( #8790 )
...
* Add GCC generalized atomic operation function
* 修复POSIX线程本地存储寻找posix线程句柄时的逻辑错误
2024-04-15 23:13:24 +08:00
Troy
5bb902895c
[libc] add some posix function comments
2024-04-09 18:11:34 -04:00
Troy
3a4db99104
[libc][posix/io] add comments
2024-04-01 23:18:15 -04:00
Troy
7e492fc37c
Add comments for all functions in components/libc/posix/io/eventfd/eventfd.c
2024-03-28 21:28:46 -04:00
Shell
83e95bdff4
sync smart & dfs ( #8672 )
...
Signed-off-by: xqyjlj <xqyjlj@126.com >
Signed-off-by: Shell <smokewood@qq.com >
Co-authored-by: xqyjlj <xqyjlj@126.com >
2024-03-28 23:42:56 +08:00
Troy
56fd6984ac
Fix the issue of incorrect return of invalid parameters in aio_write
2024-03-27 22:58:54 -04:00
Troy
51d4a9c804
Fix epoll.c file format error
2024-03-26 17:42:01 -04:00
Troy
9fc7c7569b
Fix incorrect naming of triggered
2024-03-26 17:42:01 -04:00
Troy
46d6036c28
modified: components/libc/posix/io/aio/aio.c Added some function comments
...
modified: components/libc/posix/io/aio/aio.h Align comments within the aiocb structure
modified: components/libc/posix/io/epoll/epoll.c Add comments for all functions and members within structure members
2024-03-26 17:42:01 -04:00
Troy
b228f67385
modified: components/libc/posix/delay/delay.c Added comments for all functions in this file
...
modified: components/libc/posix/signal/posix_signal.c Add comments to the sigqueue function, although it does not have an internal implementation
modified: components/libc/posix/signal/posix_signal.h Added detailed explanation to all members of the rt_signal_value enumeration
2024-03-25 18:36:17 -04:00
Shell
71560bafb5
🎯 Sync smart & scheduler codes ( #8537 )
...
Signed-off-by: Shell <smokewood@qq.com >
Co-authored-by: xqyjlj <xqyjlj@126.com >
2024-02-23 17:49:15 +08:00
rcitachi
0c96b26c23
[sys_bind] [signalfd] update ( #8507 )
2024-01-26 22:14:02 +08:00
zmq810150896
cdad0c254a
Update epoll and timerfd ( #8330 )
2023-12-21 11:17:59 +08:00
zmq810150896
833b43dbc7
[libc][Kconfig] default open epoll/eventfd/signalfd/timerfd/select ( #8386 )
2023-12-21 01:00:26 +08:00
geniusgogo
0b6402f3cb
update libc ( #8335 )
2023-12-10 06:49:24 +08:00
zmq810150896
2790ce5357
Updated issues related to uds capacity and eventfd macro redefinition ( #8329 )
2023-12-06 13:51:13 +08:00
rcitachi
c06f4e98fc
[SAL] Update SAL,Add socketpair sendmsg recvmsg function ( #8293 )
2023-11-28 13:56:06 +08:00
xqyjlj
3283f54c7a
🎈 perf: perf rt_hw_interrupt_disable/enable ( #8042 )
...
Signed-off-by: Shell <smokewood@qq.com >
Co-authored-by: Shell <smokewood@qq.com >
2023-10-25 20:31:25 +08:00