mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-08 14:16:47 +00:00
删除无用的cfs.h (#136)
This commit is contained in:
parent
587086d3f2
commit
2726f101b4
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -147,7 +147,6 @@
|
||||
"compiler_attributes.h": "c",
|
||||
"timer.h": "c",
|
||||
"hid.h": "c",
|
||||
"cfs.h": "c",
|
||||
"proc.h": "c",
|
||||
"compiler.h": "c",
|
||||
"hpet.h": "c",
|
||||
|
@ -29,5 +29,4 @@
|
||||
#include <mm/mm.h>
|
||||
#include <mm/slab.h>
|
||||
#include <process/process.h>
|
||||
#include <sched/cfs.h>
|
||||
#include <sched/sched.h>
|
@ -1,39 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <common/glib.h>
|
||||
#include <process/process.h>
|
||||
|
||||
// @todo: 用红黑树重写cfs的队列
|
||||
struct sched_queue_t
|
||||
{
|
||||
long count; // 当前队列中的数量
|
||||
long cpu_exec_proc_jiffies; // 进程可执行的时间片数量
|
||||
struct process_control_block proc_queue;
|
||||
};
|
||||
|
||||
extern struct sched_queue_t sched_cfs_ready_queue[MAX_CPU_NUM]; // 就绪队列
|
||||
|
||||
/**
|
||||
* @brief 调度函数
|
||||
*
|
||||
*/
|
||||
void sched_cfs();
|
||||
|
||||
/**
|
||||
* @brief 将PCB加入就绪队列
|
||||
*
|
||||
* @param pcb
|
||||
*/
|
||||
void sched_cfs_enqueue(struct process_control_block *pcb);
|
||||
|
||||
/**
|
||||
* @brief 从就绪队列中取出PCB
|
||||
*
|
||||
* @return struct process_control_block*
|
||||
*/
|
||||
struct process_control_block *sched_cfs_dequeue();
|
||||
/**
|
||||
* @brief 初始化CFS进程调度器
|
||||
*
|
||||
*/
|
||||
void sched_cfs_init();
|
@ -17,8 +17,6 @@
|
||||
|
||||
#define IS_VALID_SCHED_POLICY(_policy) ((_policy) > 0 && (_policy) <= SCHED_MAX_POLICY_NUM)
|
||||
|
||||
|
||||
|
||||
// struct sched_param
|
||||
// {
|
||||
// int sched_priority;
|
||||
@ -60,18 +58,10 @@
|
||||
// */
|
||||
// int sched_setscheduler(struct process_control_block *p, int policy, const struct sched_param *param);
|
||||
|
||||
/**
|
||||
* @brief 包裹sched_enqueue(),将PCB加入就绪队列
|
||||
*
|
||||
* @param pcb
|
||||
*/
|
||||
|
||||
// ================= Rust 实现 =============
|
||||
extern void sched_update_jiffies();
|
||||
extern void sched_init();
|
||||
extern void sched();
|
||||
extern void sched_enqueue(struct process_control_block *pcb);
|
||||
extern void sched();
|
||||
|
||||
void switch_proc(struct process_control_block *prev, struct process_control_block *proc);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user