mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-30 10:33:27 +00:00
Patch sched rust (#139)
* update * 添加rt调度器的rust初步实现 * 完善rt调度逻辑 * 调试rt调度器 * 修改sched的返回值 * cargo fmt 格式化 * 删除无用代码,修补rt bug * 删除无用的代码,和重复的逻辑 * 软中断bugfix * 删除一些代码 * 添加kthread_run_rt文档 * 解决sphinix警告_static目录不存在的问题 Co-authored-by: longjin <longjin@RinGoTek.cn>
This commit is contained in:
@ -54,6 +54,23 @@ struct process_control_block *kthread_create_on_node(int (*thread_fn)(void *data
|
||||
__kt; \
|
||||
})
|
||||
|
||||
/**
|
||||
* @brief 创建内核实时线程,并将其唤醒
|
||||
*
|
||||
* @param thread_fn 该内核线程要执行的函数
|
||||
* @param data 传递给 thread_fn 的参数数据
|
||||
* @param name_fmt printf-style format string for the thread name
|
||||
* @param arg name_fmt的参数
|
||||
*/
|
||||
#define kthread_run_rt(thread_fn, data, name_fmt, ...) \
|
||||
({ \
|
||||
struct process_control_block *__kt = kthread_create(thread_fn, data, name_fmt, ##__VA_ARGS__); \
|
||||
__kt=process_init_rt_pcb(__kt); \
|
||||
if (!IS_ERR(__kt)){ \
|
||||
process_wakeup(__kt);} \
|
||||
__kt; \
|
||||
})
|
||||
|
||||
/**
|
||||
* @brief 向kthread发送停止信号,请求其结束
|
||||
*
|
||||
|
Reference in New Issue
Block a user