summaryrefslogtreecommitdiff
path: root/src/scheduler_up.c
AgeCommit message (Collapse)Author
2026-04-08feat(core): Add Cortex-M4 interrupt context helperswdfk-prog
2026-04-08fix(src): Use interrupt nest accessor and export IRQ hook pointerswdfk-prog
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-21[kernel]fix scheduling exception caused by interrupt preemption in rt_schedulewdfk-prog
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-08-28[kernel] rt_scheduler_lock_nest使用原子操作ryancw
2025-08-06[kernel] add UP scheduler critical switch flag.Pillar
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-03-17解决bps/simulator无法在vs2019环境下编译latercomer
Signed-off-by: latercomer <[email protected]>
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-10-23[kernel] Specification interrupt nested level variable declaration type (#9568)Yuqiang Wang
2024-09-01feat: kernel/libcpu: fit into ilp32dShell
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-04-19fixup: add Kconfig optionShell
2024-04-10[src][scheduler]修复 rt_exit_critical_safe 函数错误地使用了返回sp-cai
函数 rt_exit_critical_safe 应是没有返回值的,rt_exit_critical() 也是没返回值的
2024-03-20[kernel] remove redundant _scheduler_stack_checkShell
2024-02-23🎯 Sync smart & scheduler codes (#8537)Shell
Signed-off-by: Shell <[email protected]> Co-authored-by: xqyjlj <[email protected]>
2024-01-02[kernel] support for hook listShell
Signed-off-by: Shell <[email protected]>
2023-10-30[kernel][scheduler]Modify the timing of clearing RT_THREAD_STAT_YIELD… (#8142)Shicheng Chu
2023-10-30实现MPU抽象层 (#8080)tangzz98
- 为RT-Thread设计MPU抽象层,支持ARMV7-M,ARMV8-M架构,让用户使用MPU检测栈溢出等内存问题,实现线程内存隔离 - 在components/mp目录下提供通用的API,libcpu目录下提供各处理器架构的具体实现 - 在STM32U575 NUCLEO, STM32H75 NUCLEO开发板测试通过
2023-07-09[debug] remove RT_DEBUG_xxxMeco Man
remove RT_DEBUG_THREAD RT_DEBUG_SCHEDULER RT_DEBUG_IPC RT_DEBUG_TIMER RT_DEBUG_IRQ RT_DEBUG_MEM RT_DEBUG_SLAB RT_DEBUG_MEMHEAP
2023-06-29[include][dbg]update: no longer use RT_DEBUG_LOG in rtdebug.h (#7750)Shicheng Chu
2023-04-14[HUST CSE][document] Fix some comments, invalid grouping commands and ↵Xu Biang
warnings in Doxygen. 将Doxygen输入文件(由Doxyfile中的INPUT定义)中的失效Doxygen分组指令(如/*@*/和/*@}*/)更改为有效的分组指令(如/**@*/和/**@}*/);(此处只对INPUT中的文件做了修改,bsp目录下和libcpu目录下存在近万个失效的Doxygen分组指令,但由于不作为文档的输入文件且这些文件过于庞大老旧,没有对这些文件中的无效指令做修改) 将图片文件统一放入了images目录下; 修改了Doxyfile和部分Doxygen注释,使得Doxyfile能够定位到新的代码路径且不受重复实现的影响; 解决了一些注释中的参数名不匹配、参数多余/缺失等问题。
2023-04-04[kernel] 将rt_thread结构体改为显式继承rt_object (#7131)Shicheng Chu
2023-03-29[src][scheduler] Split scheduler.c (#7103)螺丝松掉的人