summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2025-03-17rttypes.h中增加了对ARCH_CPU_64BIT宏的判断latercomer
Signed-off-by: latercomer <[email protected]>
2025-03-17rttypes.h中rt_intptr_t和rt_uintptr_t定义反了 (#10115)LaterComer
2025-03-10fix: clear error compilation of signal in qemu-a9 smp modekurisaw
2025-03-10fix: fixed an issue where rt_typeof was not supported in the MDK toolchainkurisaw
2025-02-15doxygen: add prefix for groups (#9991)Chen Wang
* doxygen: add prefix for groups Add "group_" prefix to doxygen group names. This makes it easier to grep with group name later. This patch only modifies the groups defined in the pathes of INPUT of documentation/Doxyfile: INPUT = . \ ../src \ ../include \ ../components/finsh \ ../components/drivers/include/drivers \ ../components/drivers/clk \ ../components/dfs/dfs_v2/src \ ../components/dfs/dfs_v2/include Other groups are not touched. Signed-off-by: Chen Wang <[email protected]> * ci: fixed error report when run file_check.py Such as: - "please delete extra space at the end of this line." - "the RT-Thread error code should return negative value. e.g. return -RT_ERROR" Signed-off-by: Chen Wang <[email protected]> --------- Signed-off-by: Chen Wang <[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-13[FIXUP] __rt_clz loss in aarch64GuEe-GUI
Signed-off-by: GuEe-GUI <[email protected]>
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[DM/FEATURE] Support NVME (#9591)GUI
* [DM/FEATURE] Support NVME 1. Support PRP and SGL (>= NVME v1.1) transport. 2. Support MSI/MSI-X for IO queues. 3. Support NVME on PCI. Signed-off-by: GuEe-GUI <[email protected]>
2024-11-18[DM/FIXUP] remove some redundant INIT_EXPORTGuEe-GUI
Signed-off-by: GuEe-GUI <[email protected]>
2024-11-18[DM/FEATURE] DM Device IDA managementGuEe-GUI
Drivers can manage their own IDs without having to concern themselves with the register/unregister in system Link: https://github.com/RT-Thread/rt-thread/issues/9534 Signed-off-by: GuEe-GUI <[email protected]>
2024-11-04[COMPILER/FEATURE] Support rt_packedGuEe-GUI
__ARMCC_VERSION: https://smtp.keil.com/support/man/docs/armcc/armcc_chr1359124980173.htm __IAR_SYSTEMS_ICC__: <Not Found> __GNUC__: https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#index-packed-type-attribute __ADSPBLACKFIN__: <Not Found> _MSC_VER: https://learn.microsoft.com/en-us/cpp/preprocessor/pack?view=msvc-170 __TI_COMPILER_VERSION__: https://software-dl.ti.com/codegen/docs/tiarmclang/rel1_3_0_LTS/migration_guide/migrating_c_and_cpp_source/pragmas_and_attributes.html __TASKING__: https://resources.tasking.com/sites/default/files/2021-02/TASKING_Alignment%20Requirements%20Restrictions_WEB.pdf Usage: ```c rt_packed(struct object1 { int dword; char byte; }); typedef struct object1 object1; rt_packed(struct object2 { int dword; char byte; }); ``` Signed-off-by: GuEe-GUI <[email protected]>
2024-11-03feat: smp_call: added signaling call_reqShell
This patch introduces `rt_smp_call_request` API to handle queued requests across cores with user provided data buffer, which provides a way to request IPI through a non-blocking pattern. It also resolved several issues in the old implementation: - Multiple requests from different cores can not be queued in the work object of the target core. - Data racing on `rt_smp_work` of same core. If multiple requests came in turns, or if the call is used by the target cpu, while a new request is coming, the value will be overwrite. - Memory vulnerability. The rt_smp_event is allocated on stack, though the caller may not wait until the call is done. - API naming problem. Actually we don't provide a way to issue an IPI to ANY core in mask. What the API do is aligned to MANY pattern. - FUNC_IPI registering to PIC. Changes: - Declared and configured the new `RT_SMP_CALL_IPI` to support functional IPIs for task requests across cores. - Replaced the single `rt_smp_work` array with `call_req_cores` to manage per-core call requests safely. - Added `_call_req_take` and `_call_req_release` functions for atomic handling of request lifetimes, preventing data race conditions. - Replaced single event handling with a queue-based approach (`call_queue`) for efficient multi-request processing per core. - Introduced `rt_smp_call_ipi_handler` to process queued requests, reducing IPI contention by only sending new requests when needed. - Implemented `_smp_call_remote_request` to handle remote requests with specific flags, enabling more flexible core-to-core task signaling. - Refined `rt_smp_call_req_init` to initialize and track requests with atomic usage flags, mitigating potential memory vulnerabilities. Signed-off-by: Shell <[email protected]>
2024-11-03feat: rtatomic: lockless single linked listShell
Signed-off-by: Shell <[email protected]>
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-25fix: suppress unused warnings when DEBUG disabledKunYi Chen
When RT_USING_DEBUG is disabled, variables used only in RT_ASSERT statements become unused, triggering -Wunused-but-set-variable compiler warnings. These variables are essential for runtime assertions in debug builds but appear unused in release builds. Example: - Variables used in RT_ASSERT(var != RT_NULL) checks - Affects multiple drivers and components using RT_ASSERT This is a general cleanup to improve code compilation without affecting functionality.
2024-10-21给使用独立的defunct线程添加限制条件heyuanjie87
2024-10-21分离defunctheyuanjie87
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-09-25feat: includes: included kerrno.h in rtdef.hShell
Those definitions are presented in rtdef.h until PR #9461 moved them to kerrno.h, which introduced unknown definition error for project building Changes: - Added includes of kerrno.h Signed-off-by: Shell <[email protected]>
2024-09-24SMPzhujiale
2024-09-24smp_ipizhujiale
2024-09-23[klibc] add kerrno.hMeco Man
2024-09-06[DM] Extended drivers MISC interfaceGuEe-GUI
1. RT_FIELD_PREP: prepare a bitfield element. 2. RT_FIELD_GET: extract a bitfield element. 3. rt_offsetof: member offset of a struct 4. rt_upper_32_bits: high 32 bits of value. 5. rt_lower_32_bits: lower 32 bits of value. 6. rt_upper_16_bits: high 16 bits of value. 7. rt_lower_16_bits: lower 16 bits of value. 8. rt_max_t: fix type of max(...). 9. rt_ilog2: integer logarithm base 2. Signed-off-by: GuEe-GUI <[email protected]>
2024-09-01feat: kernel/libcpu: fit into ilp32dShell
2024-08-13feat: set RT_USING_STDC_ATOMIC to first priorityShell
RT_USING_STDC_ATOMIC is a user selected option on current config system. While the RT_USING_HW_ATOMIC is a forced option selected by Kconfig under libcpu. And the RT_USING_STDC_ATOMIC will be meaningless if we set RT_USING_HW_ATOMIC to first priority if the arch has hw-atomic. Changes: - set RT_USING_STDC_ATOMIC to first priority on rttypes.h Signed-off-by: Shell <[email protected]>
2024-08-09fix rt_atomic_dec_and_testzhao maosheng
2024-07-19[src][tick]rt_tick setting arbitrary value function is added to support ↵wdfk-prog
low-power wake-up tick compensation
2024-06-27[doc][doxygen] Fix hook struct error.supperthomas
Signed-off-by: supperthomas <[email protected]>
2024-06-26[doc][doxygen] Fix doxygen struct error.supperthomas
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-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-30[Feature] Support simple power domain API (#9005)GUI
* [Feature] Power domain for device 1.Support device power on/off. 2.Support attach/detach device. 3.Support power domain driver api. Signed-off-by: GuEe-GUI <[email protected]> * [DM/platform] Enhanced platform bus 1.Add power domain for device. 2.Support `remove` and `shutdown` bus interface. Signed-off-by: GuEe-GUI <[email protected]> --------- Signed-off-by: GuEe-GUI <[email protected]>
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-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-11[include/rtthread.h] rt_thread_close函数声明应当与RT_USING_HEAP无关Yang Xijing
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-22[ipc] [dataqueue] 修复队列 pop 挂起的线程 push ↵sp-cai
无法恢复运行的错误 (#8839) 队列在 push 后查找挂起列表时使用了错误的挂起列表。
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-19[src] Fixup UP irq_spinlockShell
Use scheduler lock in up irq_spinlock to avoid scheduling during spinlock. Signed-off-by: Shell <[email protected]>
2024-04-19fix for art-pi smartxiao-mang
2024-04-19fix for art-pi smartxiao-mang