summaryrefslogtreecommitdiff
path: root/components/lwp
AgeCommit message (Collapse)Author
2026-04-01fix(lwp): reject wrapped user copy rangesAFWEF_147
2026-03-31style: format code with clang-format [skip ci]Telecaster2147
2026-03-31fix(lwp): validate thread priority in sched syscallsAFWEF_147
2026-03-12[lwp/aarch64] Fix macro definition style in reloc.chuangshuhua
Split the merged #define macros on line 13 into separate lines to comply with coding standards and avoid potential preprocessor issues.
2026-02-13chore: fix typo in components and libcputheqengineer
2026-01-31[components][clock_time] Refactor time subsystem around clock_time (#11111)Bernard Xiong
* [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
2025-11-15doxygen: add comments for lwp shared memory APIsibvqeibob
Add Doxygen-style comments for the lwp shared memory public APIs in components/lwp/lwp_shm.c and the related control structure. This change is documentation-only and does not modify any runtime behavior or logic. Signed-off-by: ibvqeibob <[email protected]>
2025-10-20Fix comment for address_search_head field of lwp structure.ligr
2025-10-20Align annotations of struct fields.ligr
2025-10-20fix structure comments according to doxygen spec.ligr
2025-10-20[components/lwp]add doxygen comment for lwp.c with lwp.h.ligr
2025-10-04[components/lwp]add doxygen comment for lwp futex. (#10763)Guorui Li
2025-09-26[components/lwp]add doxygen comment for lwp_dbg.c.ligr
2025-09-25[components/lwp]add doxygen comment for lwp avl implementation.ligr
2025-09-24[components/lwp]add doxygen comment for lwp_tid.ligr
2025-09-24RT_TIMER_CTRL_SET_TIME only accept rt_tick_t, pass rt_tick_t instead ↵Yonggang Luo
int/rt_int32_t
2025-09-19[components/lwp]add doxygen comment for lwp_pid. #10702Guorui Li
2025-09-14[components/lwp]add doxygen comment for lwp_args. (#10696)Guorui Li
2025-07-23[lwp][rv64] riscv: fix potential signal handler infinite loopYulong Wang
2025-07-23[lwp][rv64] restore tp register in arch_thread_signal_enter to fix user-mode ↵Yulong Wang
memory access
2025-07-07[smart] Optimize error handling after command executionbernard
2025-07-07[smart] rename the Group name to 'lwProcess' and optimize the error handling ↵bernard
for vDSO building.
2025-06-30[vdso] fix the arch/abi flag issue.bernard
2025-06-30[vdso] use the default arch/abi flags in risc-v vDSO building.BernardXiong
2025-05-19[smart] Fix parameter issue when calling the __arch_get_hw_counter function.bernard
2025-05-19[smart] Enhance build script with additional cleanup stepsbernard
2025-05-19[smart] Fix typo in vDSO Kconfig.bernard
2025-05-19[smart] move vdso.c to arch/common folder.bernard
2025-05-19[smart] Add vDSO support for RISC-V architecture and refactor related componentsbernard
- Implemented vDSO functionality for the RISC-V architecture, including the necessary source files and linker scripts. - Introduced a new `vdso_sys.c` file for RISC-V, containing functions to handle time retrieval using the vDSO mechanism. - Created architecture-specific linker scripts (`vdso.lds.S`) for both AArch64 and RISC-V. - Updated the build system to support vDSO compilation for RISC-V, including necessary adjustments in `SConstruct` files. - Refactored existing vDSO code to improve compatibility and maintainability across architectures. - Adjusted the maximum number of PTY devices in the terminal configuration from 64 to 32 for better resource management. - Fixed minor issues in existing code, including correcting the path for the vDSO shared library and ensuring proper function definitions.
2025-05-09[component/lwp]add annotation for lwp elf. (#10230)Guorui Li
* [component/lwp]add annotation for lwp elf. * Update components/lwp/lwp_elf.c Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
2025-04-13add RT_THREAD_CTRL_SET_PRIORITYwycwyhwyq
2025-04-13add RT_THREAD_CTRL_SET_PRIORITYwycwyhwyq
2025-02-25feat: mm: added affinity pages allocatorShell
This patch introduces a tagged pages allocator to address the existing problems of page aliasing on specific platforms and the requirement of page coloring. It implements an affinity-id aware page manager by separating the runtime page list into two types: a normal single linked-list and a multi-dimensional affinity-list. Changes: - Introduced tagged pages allocator and managing algorithm for affinity pages list - Modified components to support affinity-id list management - Updated page allocation and freeing functions to handle tagged pages - Added configuration options for page affinity block size and debugging - Modified mmap and elf loading to respect affinity settings - Enhanced page list management to support multi-dimensional affinity-list Signed-off-by: Shell <[email protected]>
2025-02-24[lwp/riscv]修正用户态参数空间占用堆地址空间的问题 (#10014)heyuanjie87
* [lwp/riscv]修正用户态参数空间占用堆空间的问题
2025-02-18[lwp]add comments for lwp system calls. (#9934)Guorui Li
2025-02-18[lwp]检查killpg的signo参数的有效性 (#9981)heyuanjie87
* [lwp]对检查killpg的signo参数的有效性
2025-02-08[lwp]修正kill(pid < -1)时的返回值错误heyuanjie87
2025-01-21[lwp]修正无法通过文件名查找pid的问题 (#9935)heyuanjie87
2025-01-16lwp: Kconfig: LWP_DEBUG default as n (#9921)Chen Wang
LWP_DEBUG is debugging related, should be disabled by default. Signed-off-by: Chen Wang <[email protected]>
2025-01-08fix: add \n for addr2line hintMeco Man
2025-01-06feat: add support for dfs remount functionalityShell
This patch introduces a remount feature for the DFS, allowing for the modification of mount parameters without unmounting the filesystem, the remount functionality helps modify certain mount flags (like `MS_RDONLY`) without requiring an unmount, providing more control over mounted filesystems in the system. The updates is essential for user space init proc to cleanup the runtime resource, ensuring clean handling of cached data and enhancing system robustness during power down processing. Changes: - Defined new constants for remount flags in `dfs_fs.h`. - Added the `dfs_remount()` function in `dfs_fs.c` to handle remount operations. - Introduced a check for unsupported flags and handle error conditions such as invalid paths or non-directory targets. - Updated the `dfs_mnt` structure in `dfs_mnt.h` to include a read-only flag (`MNT_RDONLY`). - The `dfs_remount()` function allows changing the read-only status of a mounted filesystem. - Added `MNT_LAZY_UMNT` and `MNT_RDONLY` flags to `dfs_mnt` structure. - Introduced `dfs_mnt_setflags` function for dynamic flag management. - Updated `dfs_remount` to utilize `dfs_mnt_setflags` for flag setting. - Enhanced unmount operations with `dfs_mnt_umount_iter` and lazy unmounting. - Added `dfs_pcache_clean` to handle cache cleanup for read-only mounts. - Improved error reporting in `dfs_umount` for better user feedback. - Refactored `sys_mount` to streamline parameter handling and support remounts. - Introduced `_cp_from_usr_string` helper for user-space string operations. - Updated internal APIs to ensure consistency in reference count management. Signed-off-by: Shell <[email protected]>
2025-01-06feat: add system reboot and process teardown supportShell
The patch introduces support for system reboot functionality and process teardown, allowing for a clean shutdown and unmounting of the root filesystem. This is necessary for ensuring a proper system shutdown process, especially when dealing with resource cleanup and ensuring that all processes have exited before system shutdown. Changes: - Added `lwp_teardown()` function to handle process cleanup and system teardown. - Introduced `lwp_pid_wait_for_empty()` to wait for process ID table emptiness before proceeding with shutdown. - Updated `dfs_mnt_unref()` to trigger callbacks when unmounting a filesystem. - Added new reboot types (`RB_AUTOBOOT`, `RB_POWER_OFF`) and implemented their corresponding actions, including cleanup of processes and unmounting root filesystem. - Extended `sys_reboot()` to handle reboot and power off types with appropriate callbacks for process and filesystem teardown. - Introduced callback mechanism for root filesystem unmount notifications. Signed-off-by: Shell <[email protected]>
2025-01-06feat: add universal process runtime serviceShell
This change introduces the `lwp_runtime.c` component, which provides the necessary runtime environment for the init process, including boot scripts, shutdown, and poweroff functionalities. The initialization logic has been moved from `lwp.c` to this new file, enhancing modularity and flexibility in handling LWP runtime tasks. Changes: - Moved the `lwp_startup` function from `lwp.c` to `lwp_runtime.c` to handle system initialization and runtime environment setup. - Added `lwp_teardown` placeholder for system shutdown and cleanup tasks in the future (though not yet implemented). - Introduced the `LWP_USING_RUNTIME` configuration option in `Kconfig` to conditionally enable the runtime environment. - Updated the `SConscript` to conditionally include `lwp_runtime.c` based on the `LWP_USING_RUNTIME` configuration. - Removed the old `lwp_startup` code from `lwp.c`, simplifying the file. Signed-off-by: Shell <[email protected]>
2025-01-06feat: add signal kill all functionalityShell
This change introduces the `lwp_signal_kill_all` function, which allows a signal to be sent to all processes in the system. The function iterates over all PIDs and sends the specified signal to each process, except those that are protected from signals. This enhancement provides a convenient way to broadcast signals across all processes in the system. Changes: - Added `lwp_signal_kill_all` function in `lwp_signal.c` to broadcast a signal to all processes by iterating over all PIDs using the existing `lwp_pid_for_each` function. - Introduced a new `kill_all_param` structure to encapsulate the signal information needed for killing processes. - Added internal `_kill_each` helper function for sending the signal to each PID. - Updated `lwp_signal.h` with the new function prototype for `lwp_signal_kill_all`. - Modified `sys_kill` in `lwp_syscall.c` to call `lwp_signal_kill_all` when a process is not specified. Signed-off-by: Shell <[email protected]>
2025-01-06feat: support PID iterationShell
This change introduces the `lwp_pid_for_each` function, which provides a convenient and thread-safe method for iterating over PIDs with a user- defined callback. This addition is necessary to support cases where operations must be performed on each PID in the balanced tree, enhancing flexibility and modularity for PID management. Changes: - Added `lwp_pid_for_each` function in `lwp_pid.c` to allow iteration over PIDs using a callback function and optional data parameter. - Defined a new internal `pid_foreach_param` structure to encapsulate the callback and data for the iteration. - Added `_before_cb` helper function for executing the callback on each PID node during AVL traversal. - Ensured thread safety by acquiring and releasing the PID lock around the AVL traversal within `lwp_pid_for_each`. - Updated `lwp_pid.h` with the `lwp_pid_for_each` function prototype and included `rtthread.h` for necessary types. Signed-off-by: Shell <[email protected]>
2024-12-20kernel: cleanup debug APIsChen Wang
- `dbg_log` is a “NOT RECOMMENDED API”, convert the calling of this API to LOG_x and remove this API. - `dbg_here`/`dbg_enter`/`dbg_exit`: no one use these APIs, remove them directly. Signed-off-by: Chen Wang <[email protected]>
2024-12-17[serial] add bypass testcase in utestzhujiale
2024-12-12[lwp] fix TTYSUP_CFLAG did not include CBAUD flagzhujiale
2024-11-17Modify the position of libc_rent definitionrcitachi
2024-11-12fixup: smart: uninitialized buffer on mount(2) (#9636)Shell
The `struct stat` object used inside mount(2) is uninitialized, which can lead to undefined behavior during running Changes: - Set zero to buffer before calling to stat() Signed-off-by: Shell <[email protected]>