summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2024-12-24[utest] remove rt_kprintf from TC_rt_sprintf.cMeco Man
2024-12-22[utest][klibc] add rt_sprintf family functions test casesMeco Man
2024-12-21[utest] add rt_memcpy utest caseMeco Man
2024-12-18[kernel] change size_t to rt_size_tguozhanxin
2024-12-07fix:[klib]Kconfig显示文案错误wdfk-prog
2024-12-03[klibc] format KconfigMeco Man
2024-11-26kernel: Optimize display format for auto init when debuggingChen Wang
When RT_DEBUGING_AUTO_INIT is enabled, kenrel will add more print message for auto init. However, the original format easily causes the kernel printing and the init function printing to be connected together, resulting in a confusing display format. For exmaple: ``` initialize lwip_system_initlwIP-2.0.3 initialized! :0 done ``` Or ``` initialize sal_init[I/sal.skt] Socket Abstraction Layer initialize success. :0 done ``` Solution: Add a carriage return to separate the kernel printing and the init function printing. After changing, the output will be: ``` initialize lwip_system_init lwIP-2.0.3 initialized! :0 done ``` Or ``` initialize sal_init [I/sal.skt] Socket Abstraction Layer initialize success. :0 done ``` Signed-off-by: Chen Wang <[email protected]>
2024-11-25[klibc] separate klibc KconfigMeco Man
2024-11-25[klibc] add rt_sscanfMeco Man
cherry-pick from: https://github.com/PetteriAimonen/Baselibc/blob/master/src/vsscanf.c BSD license
2024-11-24[kernel] format KconfigMeco Man
2024-11-24[klibc] add rt_vsnprintf_std.c and rename RT_KLIBC_USING_VSNPRINTF_LONGLONGMeco Man
2024-11-19Update src/KconfigMeco Man
2024-11-19[ci] add RT_USING_CI_ACTIONMeco Man
2024-11-18[utest][Kconfig] adjust RT_CONSOLEBUF_SIZE when utest is enabledMeco Man
2024-11-03feat: Added rt_interrupt_context* family for nested interrupt handlingShell
These changes introduce the rt_interrupt_context family, providing a mechanism for managing nested interrupts. The context management ensures proper storage and retrieval of interrupt states, improving reliability in nested interrupt scenarios by enabling context tracking across different interrupt levels. This enhancement is essential for platforms where nested interrupt handling is crucial, such as in real- time or multi-threaded applications. Changes: - Defined rt_interrupt_context structure with context and node fields in `rtdef.h` to support nested interrupts. - Added rt_slist_pop function in `rtservice.h` for simplified node removal in singly linked lists. - Declared rt_interrupt_context_push, rt_interrupt_context_pop, and rt_interrupt_context_get functions in `rtthread.h` to manage the interrupt/exception stack. - Modified AArch64 CPU support in `cpuport.h` to include rt_hw_show_register for debugging registers. - Refactored `_rt_hw_trap_irq` in `trap.c` for context-aware IRQ handling, with stack push/pop logic to handle nested contexts. - Implemented interrupt context push, pop, and retrieval logic in `irq.c` to manage context at the CPU level. Signed-off-by: Shell <[email protected]>
2024-10-29[src][clock] RT_TICK_PER_SECOND为1000时tick不用进行转换ryancw
2024-10-23[kernel] Specification interrupt nested level variable declaration type (#9568)Yuqiang Wang
2024-10-22[src][signal]:fix issue with inconsistency between sig_mask and sigaddset ↵zhangjing
implementations when using musl libc
2024-10-21解决编译错误heyuanjie87
2024-10-21去除多余空格heyuanjie87
2024-10-21解决编译警告heyuanjie87
2024-10-21给使用独立的defunct线程添加限制条件heyuanjie87
2024-10-21分离defunctheyuanjie87
2024-10-21[kernel]在smart模式也启用"回收线程"heyuanjie87
lwp的某些资源回收放到了后台,其中会引起线程挂起,而idle不应该被挂起
2024-10-19feat: remove RT_USING_SCHED_THREAD_CTXShell
Prepare for the next release by removing the compatible codes for v5.1.0 and before. Changes: - Remove the compatible macros and Kconfig options for the old struct rt_thread layout. Signed-off-by: Shell <[email protected]>
2024-10-11feat: arm64: update thread self on sp-switchShell
This patch improves the atomicity of context switching by ensuring that the stack pointer (sp) and thread self updates occur simultaneously. This enhancement is crucial for maintaining thread safety and preventing potential inconsistencies during context switches. Changes: - Modified `cpuport.h` to use `ARM64_THREAD_REG` for thread self access. - Added an `update_tidr` macro in `context_gcc.S` to streamline thread ID updates. - Adjusted `rt_hw_context_switch_to` and `rt_hw_context_switch` to call `update_tidr`, ensuring atomic updates during context switches. - Cleaned up `scheduler_mp.c` by removing redundant thread self assignments. Signed-off-by: Shell <[email protected]>
2024-09-23[klibc] add kerrno.hMeco Man
2024-09-22[klibc] format comments after #9459Meco Man
2024-09-22fix:[kstdio]Disable "-Wimplicit-fallthrough" below GNUC V7 (#9459)wdfk-prog
fix:Disable "-Wimplicit-fallthrough" below GNUC V7
2024-09-11[kernel][mutex] fix bug of thread exit without releasing mutex & add error ↵zms123456
check log
2024-09-06[utest]add mutex_pi_tczms123456
* add mutex_pi * fix assertion error when thread wakeup while waiting mutex
2024-09-03fixup: ipc: protect taken_list on shared lockShell
为什么提交这份PR (why to submit this PR) Issue: using iperf server with sshd together and the kernel will get stuck occasionally. taken_list is accessed from other mutex when updating priority. 你的解决方案是什么 (what is your solution) protect taken_list on shared lock, but not on mutex local spinlock. Signed-off-by: Shell <[email protected]>
2024-09-03[fix][device] ↵Yaochenger
修正使用rt_device_create创建设备,使用rt_device_destroy删除失败的问题
2024-09-01feat: kernel/libcpu: fit into ilp32dShell
2024-08-27feat: add memset zero for rt_thread_initShell
`rt_object_allocate()` will clear memory after new rt_thread allocate in `rt_thread_create()`. However, in `rt_thread_init()` the same behavior is missing, which corrupt the consistence of the API. Changes: - Added `memset()` zero for `rt_thread_init()` in the entry Signed-off-by: Shell <[email protected]>
2024-08-18mem: fix some log issue in src/slab.cCrazyJhq
2024-07-19[src][tick]rt_tick setting arbitrary value function is added to support ↵wdfk-prog
low-power wake-up tick compensation
2024-07-15[lwp][vdso] Add VDSO functionality under the aarch64 architecture (#9176)rcitachi
Add VDSO functionality under the aarch64 architecture
2024-06-29[src][thread]fix rt_thread_resume return value error (#9114)zms123456
fix rt_thread_resume return value error
2024-06-27[doc][doxygen] Fix hook struct error.supperthomas
Signed-off-by: supperthomas <[email protected]>
2024-06-26[doc][doxygen]: Fix doxygen warning in commentsupperthomas
kservice.c:474: warning: The following parameter of rt_backtrace_to_buffer(rt_thread_t thread, struct rt_hw_backtrace_frame *frame, long skip, rt_ubase_t *buffer, long buflen) is not documented: parameter 'thread' kernel.h:157: warning: unable to resolve reference to '_rt_errno' for \ref command Signed-off-by: supperthomas <[email protected]>
2024-06-20[timer]add all soft timer config (#9048)zms123456
* add all soft timer * update wq * add timer test * shield LOG_D
2024-06-18[libcpu] rv64: support for ARCH_REMAP_KERNEL (#9067)Shell
* [libcpu] support for ARCH_REMAP_KERNEL These changes introduce support for the ARCH_REMAP_KERNEL configuration, which isolates kernel space in high virtual address regions. This feature is necessary to enhance memory protection and management by segregating user and kernel spaces more effectively. Changes: - Updated conditional macros to check for ARCH_REMAP_KERNEL instead of ARCH_KERNEL_IN_HIGH_VA in board initialization files to reflect the new configuration option. - Modified qemu-virt64-riscv Kconfig and SConstruct files to include and utilize ARCH_REMAP_KERNEL. - Created a new linker script `link_smart.lds` for smart linking in qemu-virt64-riscv. - Updated rtconfig.py to use a more flexible execution path setup. - Enhanced user address space definitions in `lwp_arch.h` to support the new virtual address mappings. - Adjusted kernel memory initialization and mapping logic in `c906/mmu.c` and `virt64/mmu.c` to account for high virtual address regions. - Added Kconfig option to enable ARCH_REMAP_KERNEL for RISCV64 architectures. - Enhanced memory setup functions to support new mapping scheme, including updates to early page table setup and address relocation logic. These modifications ensure that the system can utilize high memory addresses for the kernel, improving memory isolation and system stability. Signed-off-by: Shell <[email protected]> * fixup: CI run failed * bsp: default config without using smart * fixup: static checks * restore rt_hw_mmu_kernel_map_init for D1 --------- Signed-off-by: Shell <[email protected]>
2024-06-13[src][kservice]fix shutdown log (#9061)zms123456
fix shutdown log
2024-06-13[kservice] Enhance support for backtrace service (#9037)Shell
[feat] Enhance support for backtrace service rt_backtrace_formatted_print() and rt_backtrace_to_buffer() to help debug routines. Also, following modification are included: - make rt_backtrace_frame patchable with weak attr - replace lwp backtrace with sync output Signed-off-by: Shell <[email protected]>
2024-06-04[smart] add CPU/thread usage tracing config (#8947)Shell
* [smart] add CPU usage tracing config This patch introduces following features: - Added CPU usage tracing functionality, enabled by default, for applications like 'top' - update time as smart independent Signed-off-by: Shell <[email protected]> * fixup: add ump idle thread --------- Signed-off-by: Shell <[email protected]>
2024-05-29[IDLE] 修改注释,避免造成歧义 (#9010)wdfk-prog
2024-05-28[arm64] add hw thread self (#8942)Shell
* [libcpu] arm64: Add hardware thread_self support This patch introduces hardware-based thread self-identification for the AArch64 architecture. It optimizes thread management by using hardware registers to store and access the current thread's pointer, reducing overhead and improving overall performance. Changes include: - Added `ARCH_USING_HW_THREAD_SELF` configuration option. - Modified `rtdef.h`, `rtsched.h` to conditionally include `critical_switch_flag` based on the new config. - Updated context management in `context_gcc.S`, `cpuport.h` to support hardware-based thread self. - Enhanced `scheduler_mp.c` and `thread.c` to leverage the new hardware thread self feature. These modifications ensure better scheduling and thread handling, particularly in multi-core environments, by minimizing the software overhead associated with thread management. Signed-off-by: Shell <[email protected]> * fixup: address suggestion * fixup: rt_current_thread as global * scheduler: add cpu object for UP scheduler Also, maintain the rt_current_thread in cpu object on UP scheduler. --------- Signed-off-by: Shell <[email protected]>
2024-05-21[quality] fixup compiler warning (#8961)Shell
Signed-off-by: Shell <[email protected]>
2024-05-21[components][driver]add isr statistics (#8955)zms123456
add isr statistics