summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2025-09-26utest: move driver related case under to driversChen Wang
src/utest/device_tc.c is testing API: rt_device_find(), which is a function defined in components/drivers/core/device.c. So it should be a testcase for drivers core, not for core. Move it to under components/drivers/core. Signed-off-by: Chen Wang <[email protected]>
2025-09-26utest: core: unify case namesChen Wang
Signed-off-by: Chen Wang <[email protected]>
2025-09-26utest: move core tesetcases under to directiry "src"Chen Wang
Signed-off-by: Chen Wang <[email protected]>
2025-09-26utest: remove RT_UTEST_USING_ALL_CASESChen Wang
Many modules' utests currently don't support enabling all tests at once. Furthermore, some modules' tests are complex, for example due to their numerous dependencies on other modules. This makes it nearly impossible to enable all tests with a single global switch. Consequently, the previously defined `RT_UTEST_USING_ALL_CASES` has lost its original meaning. We recommend deprecating this configuration switch. If a module needs to enable a group of functional tests through its own configuration, this local enable all switch should be implemented by the module itself, and a global RTT enable switch will no longer be provided. If such a requirement arises in the future, we recommend careful design, especially considering how to ensure that turning on a single switch enables all dependencies for all involved modules for ease of use. Signed-off-by: Chen Wang <[email protected]>
2025-09-24RT_TIMER_CTRL_SET_TIME only accept rt_tick_t, pass rt_tick_t instead ↵Yonggang Luo
int/rt_int32_t
2025-09-21[kernel]fix scheduling exception caused by interrupt preemption in rt_schedulewdfk-prog
2025-09-15utest: update naems using new ruleChen Wang
The names of the utest cases defined in their respective modules have been updated. Some utest case names are not yet in their respective modules because their paths need to be finalized before their unique names can be determined. Currently, these names do not appear to conflict with the unified names. These include: - utest cases still in examples - bsp/qemu-virt64-riscv/applications/test/test_vector/test_vector.c. The entire test case should probably be placed in libcpu/risc-v rather than bsp. Signed-off-by: Chen Wang <[email protected]>
2025-09-12移除已经废弃的CPU使用率相关的字段和初始化代码蒙蒙plus
2025-09-09doxygen: fixed duplicated comments for scheduler APIsChen Wang
Similar to PR #10674, `src/scheduler_mp.c` and `src/scheduler_up.c` also have similar issues. After investigation, we found: in commit 2c98ce4605 "[HUST CSE][document] Fix some comments, invalid grouping commands and warnings in Doxygen." This patch excluded `src/scheduler_mp.c` and `src/scheduler_up.c` from the Doxygen build and include `documentation/doxygen/thread.h` (the new file path after adjustment is `documentation/0.doxygen/core/thread.h`), placing the Doxygen comments for some functions in this file. However, this approach has its problems: - The comments in `documentation/0.doxygen/core/thread.h` are separated from the source code, making them difficult to maintain. This also results in the comments for the newly added functions in `src/scheduler_mp.c` and `src/scheduler_up.c` not being updated in a timely manner and failing to be compiled into Doxygen (becoming HTML). - For the average programmer, it's unlikely that they'll consider the `documentation/0.doxygen/` directory for function declarations and comments, let alone the need to maintain the Doxygen comments in that directory. Currently, the header files under `documentation/0.doxygen/` should strictly be used only to define Doxygen groups and should not include Doxygen comments for the code itself. (Similar issues exist in documentation/0.doxygen/3.hardware.h and documentation/0.doxygen/core/systeminit.h, which require further cleanup.) The solution is similar to PR #10674, where only MP documentation is generated by default. For functions defined in MP but not in UP, we use the "@note" directive in the function's doxygen comment to indicate whether the function is supported in both UP and MP, or only in MP. After implementing this solution, the file `documentation/0.doxygen/core/thread.h` can be deleted. Signed-off-by: Chen Wang <[email protected]>
2025-09-09[add][thread]Add api:rt_thread_suspend_force allow suspend other threads.Rbb666
2025-09-08doxygen: fixed duplicated comments for cpu APIsChen Wang
Refer to the issue described in PR #10599. This was a temporary fix at that time. After further research, we discovered that this issue can be addressed using the "@cond" command supported by Doxygen. Since we currently do not intend to generate two sets of documentation for UP and MP when generating Doxygen documentation, the current solution is to generate only MP documentation by default. For functions defined in MP but not in UP, we will use the "@note" command in the function's Doxygen comment to indicate whether the function supports both UP and MP, or only MP. Signed-off-by: Chen Wang <[email protected]>
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-09-01fix(klibc): also check `__clang__` when detecting gccHaojin Tang
2025-09-01fix: warnings generated by Kconfig.maosql
2025-08-30[Add][kservice]Add thread usage support.Rbb666
2025-08-28[kernel] rt_scheduler_lock_nest使用原子操作ryancw
2025-08-26utest: integrate config option for utest of klibcChen Wang
Signed-off-by: Chen Wang <[email protected]>
2025-08-12doxygen: fix build errorChen Wang
fixed: b084503b6d "[kernel] add UP scheduler critical switch flag." After this commit, doxygen build with warning: include/rtthread.h:658: warning: argument 'lock' from the argument list of rt_spin_unlock has multiple @param documentation sections include/rtthread.h:660: warning: argument 'lock' from the argument list of rt_spin_unlock_irqrestore has multiple @param documentation sections include/rtthread.h:660: warning: argument 'level' from the argument list of rt_spin_unlock_irqrestore has multiple @param documentation sections Rootcasue analysis: src/cpu_up.c and src/cpu_mp.c define two identical functions. Because the INPUT parameter in the documentation/Doxyfile currently compiles all source files under ./src, i.e both of them, Doxygen automatically merges the Doxygen comments for identically named functions if it finds the content of doxygen comments different, resulting in multiple @param. Previously, the API comments in both files were identical, so there was no problem. However, the b084503b6d change only modified the comments in src/cpu_up.c but not in src/cpu_mp.c, causing problems. Another drawback of the b084503b6d change is that Doxygen recommends a single line for the @brief; multiple lines are not recommended. Solution: Given the requirement for a single line for the @brief, this issue is relatively simple to resolve: simply list the extra content as @note. Regarding the warning: A perfect solution has not yet been found. One possible approach is to write a single Doxygen comment for a kernel API with two implementations. This approach involves writing Doxygen comments in only one file, such as src/cpu_up.c , while omitting them in src/cpu_mp.c . Another solution is to add API comments to include/rtthread.h , but the RT-Thread include/rtthread.h file is already quite large, and adding comments there would be even more cumbersome. A temporary solution currently in use is to ensure that the Doxygen comments for the same API are identical in both src/cpu_up.c and src/cpu_mp.c . This ensures that Doxygen compilation does not generate warnings, and the files are automatically merged into a single file in the HTML document. Signed-off-by: Chen Wang <[email protected]>
2025-08-06[kernel] add UP scheduler critical switch flag.Pillar
2025-07-30fix(kernel)/improve(utest):fix the legacy issue related to the length of the ↵Yuqiang Wang
object name version #10537
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-18kernel/testcase: fixed buffer overflow vulnerability in objectkurisaw
2025-07-08[signal]: fix spinlock leak in rt_thread_handle_sig()Yulong Wang
2025-06-27Remove extra semicolon in src/memheap.cYulong Wang
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-08[kernel]add doxygen comments for scheduler. (#10366)Guorui Li
* [kernel]add doxygen comments for scheduler. * [kernel]fix spell error in comments.
2025-05-23[clock]添加 rt_tick_get_delta 函数 htl5241
2025-04-18doxygen: re-org module groups (#10197)Chen Wang
Match the organization of modules (groups) with that of user guide. Preliminary arrangement. This patch is just a framework arrangement. Details need to be continued. P.S., in this patch, adding numerical prefixes to the files in documentation/0.doxygen is to meet the need of displaying sorting in HTML pages. Signed-off-by: Chen Wang <[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-03-28Update include/rtdef.h version to 5.2.1kk
2025-03-17解决__RT_KERNEL_SOURCE__宏没有定义latercomer
Signed-off-by: latercomer <[email protected]>
2025-03-17解决bps/simulator无法在vs2019环境下编译latercomer
Signed-off-by: latercomer <[email protected]>
2025-03-12修复 MMCSD 宏拼写错误+内核开启LOG_D编译问题yixinghua121
2025-03-12doxygen: update doc for kenrel object modelChen Wang
Move the introduction of function parameters in markdown to source code comments, because this part of the content is completely repeated. We only need to keep and maintain the comments in the code. The detailed explanation of the API in markdown can directly refer to the comments in the code. Try not to directly copy the definition of the structure in the markdown document, because this part of the content may change with the upgrade of the code. Therefore, when the structure definition is involved in markdown, try to indicate that it is just a code snippet. The specific definition is still directly quoted from the source code and the source code comments. It is very convenient to quote structures and functions in markdown. Just use "`" to enclose the structure name or function name, and the generated html is a link to its definition. According to this principle, this patch only modifies the documents and code comments of the kernel object model. Other modules will be modified one by one in separate patches later. Signed-off-by: Chen Wang <[email protected]>
2025-03-10feat: ci script associated with auto_utest. (#9933)Yuqiang Wang
* feat: ci script associated with auto_utest.
2025-02-25feat: improve Kconfig structure on MMShell
Signed-off-by: Shell <[email protected]>
2025-02-25feat: mm: page poison debugging and assertion enhancementsShell
This commit introduces a page poison debugging mechanism and additional assertions for memory management, improving system maintainability and debugging capabilities. The changes aim to detect illegal memory usage early and provide better clarity in managing page allocations. Changes: - Added `RT_DEBUGGING_PAGE_POISON` option to enable memory usage tracing. - Introduced a page poisoner for detecting illegal memory usage. - Implemented region-based memory tracking using bitmaps. - Enhanced spinlock protection for memory management operations. - Fixed several assertion checks for memory safety. - Renamed macros for consistency (`FLOOR` to `CEIL`). - Refined memory allocation and deallocation logic to include poisoning. - Updated Kconfig to add configurable `RT_PAGE_MAX_ORDER` and poison debugging. - Improved debugging outputs for page regions and memory operations. Signed-off-by: Shell <[email protected]>
2025-02-16[src/ktime] fix the bug when use keil AC6 and open RT_USING_HOOKLIST … (#9993)Supper Thomas
* [src/ktime] fix the bug when use keil AC6 and open RT_USING_HOOKLIST and RT_USING_KTIME
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]>
2025-01-09[utest] make RT_USING_CI_ACTION to be clearMeco Man
RT_USING_CI_ACTION will select RT_UTEST_USING_AUTO_RUN and RT_UTEST_USING_ALL_CASES
2025-01-08fix: add \n for addr2line hintMeco Man
2025-01-07[utest] add float operatorsMeco Man
uassert_float_equal and uassert_float_not_equal
2025-01-04[kservice] optimize console_deviceMeco Man
2025-01-04[rt_vsscanf] upgrade version and add test caseMeco Man
from: https://github.com/phoenix-rtos/libphoenix/blob/master/stdio/scanf.c BSD-3-Clause license
2025-01-03[utest] add rt_memset test caseMeco Man
2024-12-24[utest] implement rt_memcmp test casesMeco Man
2024-12-24[utest] implement more test case for rt_memcpyMeco Man