summaryrefslogtreecommitdiff
path: root/include/rtdef.h
AgeCommit message (Collapse)Author
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-08-22Update RT_VERSION to 5.2.2 (#10627)R b b666
Update RT_VERSION to 5.2.2.
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-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-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-08【修改】timer parameter注释 (#10172)Yang Xijing
2025-03-28Update include/rtdef.h version to 5.2.1kk
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-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-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: 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-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-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-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-04-16upgrade RT-Thread version to v5.2.0Meco Man
2024-04-15[components][drivers]fix workqueue bugzms123456
fix workqueue bug
2024-04-10add subsys early init level (#8756)geniusgogo
Signed-off-by: geniusgogo <[email protected]>
2024-04-09[drivers/serial] Introduce hooker for TTY (#8733)Shell
In this patch, a hook list has been introduced to address the concerns regarding coupling issues arising from modifications to the serial code for integrating TTY logic. Signed-off-by: Shell <[email protected]>
2024-03-28sync smart & dfs (#8672)Shell
Signed-off-by: xqyjlj <[email protected]> Signed-off-by: Shell <[email protected]> Co-authored-by: xqyjlj <[email protected]>
2024-03-06[kernel] fix warning of rt_thread_t struct (#8584)Meco Man
2024-02-23🎯 Sync smart & scheduler codes (#8537)Shell
Signed-off-by: Shell <[email protected]> Co-authored-by: xqyjlj <[email protected]>
2024-02-19[kernel] fix some strict compiling warningsMeco Man
2024-01-09[drivers][core] 完善设备模型 (#8384)fangjianzhou
2024-01-05✨ feat: delete thread ref (#8456)xqyjlj
2024-01-02[kernel] support for hook listShell
Signed-off-by: Shell <[email protected]>
2024-01-02[kernel] Add hook for malloc servicesShell
Including the patch for memory allocation, testsuites and fixups of static analysis. Signed-off-by: Shell <[email protected]>
2023-12-25[rtdef] remove legacy codeMeco Man
2023-12-21add semaphore max value control. (#8390)geniusgogo
2023-12-21✨ feat(rtdef.h): add rt_always_inlinexqyjlj
2023-11-30[nano] rt-thread susport nano optionMeco Man
2023-11-21[libc] add RT_USING_INTERNAL_LIBC_ONLY macroMeco Man
This option is for RT-Thread Nano version. If select this option, it will not compile components/libc folder and only use tool chain internal libc. Normally, the tool chain internal is only cover ISO standard (e.g. armcc), but some tool chains' internal libc will cover more than ISO standard (e.g. newlib).
2023-11-10fix rt_channel lock. (#8244)geniusgogo
2023-11-10[debug] rename RT_DEBUGING_INIT as RT_DEBUGING_AUTO_INITMeco Man