summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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
2024-05-21[utest] add device find (#8959)Shell
* [utest] add device find Signed-off-by: Shell <[email protected]> * fixup: add test * fixup: ptr aliasing * quality: meaning parameter --------- Signed-off-by: Shell <[email protected]>
2024-05-17[smart] select console device dynamically (#8949)Shell
* [smart] select console device dynamically - Fixed compiler warning on terminal subsystem for `components/lwp/terminal/terminal.h` - Updated default console setup to dynamically select an appropriate tty device based on the configured console device name. Signed-off-by: Shell <[email protected]> * fixup: remove useless codes --------- Signed-off-by: Shell <[email protected]>
2024-05-16[libcpu/arm64] add C11 atomic ticket spinlock (#8882)Shell
* [libcpu/arm64] add C11 atomic ticket spinlock Replace the former implementation of flag-based spinlock which is unfair Besides, C11 atomic implementation is more readable (it's C anyway), and maintainable. Cause toolchain can use their builtin optimization and tune for different micro-architectures. For example armv8.5 introduces a better instruction. The compiler can help with that when it knows your target platform in support of it. Signed-off-by: Shell <[email protected]> * fixup: RT_CPUS_NR --------- Signed-off-by: Shell <[email protected]>
2024-05-11[hrtimer] fixup use-after-free (#8928)Shell
Signed-off-by: Shell <[email protected]>
2024-05-10[smart] fixup arm64 aspace switch (#8925)Shell
* [smart] fixup arm64 aspace switch Signed-off-by: Shell <[email protected]> * fixup: arm add arch_kernel_mmu_table_get --------- Signed-off-by: Shell <[email protected]>
2024-05-09fix RT_DEBUGING_ASSERTgeniusgogo
2024-05-07[kernel][timer] remove wordy logsMeco Man
2024-05-08[timer] The rt_timer_check and _soft_timer_check functions are merged (#8884)wdfk-prog
2024-05-08[ipc] support of lockless rt_completion (#8887)Shell
* [ipc] lockless rt_completion implementation The new rt_completion implemented by lockless algorithm can improve timer resolution for up to ~12%, compare to sem IPC. Signed-off-by: Shell <[email protected]> * fixup: error * remove useless changes --------- Signed-off-by: Shell <[email protected]>
2024-05-08[src] add rt_hw_cpu_id() wrapper API (#8894)Shell
* [src] add rt_hw_cpu_id() wrapper API rt_hw_cpu_id() is an unsafe API which should not be used by most codes directly. It's error-prone because it must be used in proper context, otherwise it can lead to errors and unpredictable behavior. This patch adds a wrapper API for rt_hw_cpu_id() to address this risk. It includes the context-checking functionality and provides a safer alternative for obtaining CPU IDs, ensuring that it is used correctly within the appropriate context. Signed-off-by: Shell <[email protected]> * fixup UMP * update API & comment * ci: cpp_check --------- Signed-off-by: Shell <[email protected]>
2024-05-06[src][Kconfig]make RT_ASSERT independent of RT_USING_DEUBGzms123456
2024-05-01[kernel] add rt_thread_close()Shell
* [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 <[email protected]>
2024-04-28[src][thread]bind cpu fixup (#8872)zms123456
bind cpu fixup
2024-04-27[mem]When using SLAB, calls to memcheck and memtrace will be abnormal (#8862)wdfk-prog
* [mem]When using SLAB, calls to memcheck and memtrace will be abnormal * [mem]The memtrace printing system does not match the display
2024-04-20[klibc] organize and renmae macros, and add CI checkMeco Man
2024-04-20[kernel] move errno functions into klibcMeco Man
2024-04-19fixup: add Kconfig optionShell
2024-04-19fixup: debugShell
2024-04-19add cpu upShell
2024-04-18[mem] Remove useless code And Update mem documentationwdfk-prog