summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2025-10-10Remove rarely used rt_time_tYonggang Luo
next_delay should be rt_tick_t Use time_t for RT_DEVICE_CTRL_RTC_GET_TIME
2025-09-30doxygen: cleanup code for group_thread_managementChen Wang
The cleanup involved three parts: - Merging the standalone "/**@{*/" into "@addtogroup group_thread_management" - Changing "/**@}*/" to "/** @} group_thread_management */", adding the group name makes it easier to find the matching "@{" part. - Deleting the "@addtogroup" directive in "include/rtthread.h" because this header file doesn't have doxygen comments. All doxygen comments for function bodies are defined in other .c files. Note, we remian two doxygen comments for rt_thread_inited_hookproto_t and rt_thread_idle_sethook in the "include/rtthread.h". rt_thread_inited_hookproto_t is really defined here. For rt_thread_idle_sethook, please see FIXME comment for reason. Signed-off-by: Chen Wang <[email protected]>
2025-09-29doxygen: cleanup code for group_object_managementChen Wang
The cleanup involved three parts: - Merging the standalone "/**@{*/" into "@addtogroup group_object_management" - Changing "/**@}*/" to "/** @} group_object_management */", adding the group name makes it easier to find the matching "@{" part. - Deleting the "@addtogroup" directive in "include/rtthread.h" because this header file doesn't have doxygen comments. All doxygen comments for function bodies are defined in "src/object.c". Plus minor cleanup for group_hook in src/object.c. Signed-off-by: Chen Wang <[email protected]>
2025-09-12移除已经废弃的CPU使用率相关的字段和初始化代码蒙蒙plus
2025-09-02doxygen: updated doc for thread management subsystemChen Wang
Signed-off-by: Chen Wang <[email protected]>
2025-09-02[Add][kernel/thread]Add thread overflow hook and testcases:thread_overflow_tc.c.Rbb666
2025-08-30[Add][kservice]Add thread usage support.Rbb666
2025-08-22Update RT_VERSION to 5.2.2 (#10627)R b b666
Update RT_VERSION to 5.2.2.
2025-08-06[arm_compiler_v4/v5] define rt_packed as __packed #10553cmbjxxiao
2025-07-22doxygen: promote object management to a separate pageChen Wang
For "RT-Thread User Guide": Take the "RT-Thread Kernel Object Model" sub-section out of the "Kernel Basics" section and rename it to "Object Management". Correspondingly, rename the "Kernel Object Management" section in the "RT-Thread API Guide" to "Object Management". Signed-off-by: Chen Wang <[email protected]>
2025-07-22doxygen: group name all in lowcase (part 2) (#10530)Chen Wang
* doxygen: fs: unify groupname to lowercase Signed-off-by: Chen Wang <[email protected]> * doxygen: drivers: unify groupname to lowercase Signed-off-by: Chen Wang <[email protected]> * doxygen: signal: unify groupname to lowercase Signed-off-by: Chen Wang <[email protected]> --------- Signed-off-by: Chen Wang <[email protected]>
2025-06-25doxygen: group name all in lowcaseChen Wang
This patch only updated the groups defined in documentation/0.doxygen. Other groups will be moved into documentation/0.doxygen and updated at that time. Signed-off-by: Chen Wang <[email protected]>
2025-06-13修复单向列表移除节点时存在的安全风险.vandoul
Signed-off-by: vandoul <[email protected]>
2025-05-29doxygen: change group_Device to group_device_driverChen Wang
The originally defined "group_Device" should actually be part of the device-driver component, so create a new "group_device_driver" and then rename "group_Device" to "group_device_driver". Signed-off-by: Chen Wang <[email protected]>
2025-05-23[clock]添加 rt_tick_get_delta 函数 htl5241
2025-04-18include:rtdef.h: comment Refine the annotation of RT_ALIGN and RT_ALIGN_DOWN ↵ricky
(#10201) include :rtdef.h : [ Refine the annotation of RT_ALIGN and RT_ALIGN_DOWN ] This macro is vulnerable to non-2-byte alignments, but I assume that the macro definition was designed with an explicit use case of 2-byte alignments in mind. Therefore, I only modify the comment to remind the user. Solution: RT_ALIGN(size, align) ((size) + (align) - 1) / (align) * (align) RT_ALIGN_DOWN(size, align) (size) / (align) * (align) Here's what deepseek recommends more. Signed-off-by: Yucai Liu <[email protected]>
2025-04-13add RT_THREAD_CTRL_SET_PRIORITYwycwyhwyq
2025-04-13add RT_THREAD_CTRL_SET_PRIORITYwycwyhwyq
2025-04-13[src] fix mutex bugwycwyhwyq
2025-04-08【修改】timer parameter注释 (#10172)Yang Xijing
2025-03-28Update include/rtdef.h version to 5.2.1kk
2025-03-17rttypes.h中增加了对ARCH_CPU_64BIT宏的判断latercomer
Signed-off-by: latercomer <[email protected]>
2025-03-16rttypes.h中rt_intptr_t和rt_uintptr_t定义反了 (#10115)LaterComer
2025-02-22fix: clear error compilation of signal in qemu-a9 smp modekurisaw
2025-02-19fix: 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]>