1
0
mirror of https://github.com/sgmarz/osblog.git synced 2024-11-24 02:16:19 +04:00

Clean up scheduler code.

This commit is contained in:
Stephen Marz 2020-04-25 23:27:00 -04:00
parent fd9c9449b0
commit fac882ea73

View File

@ -14,18 +14,12 @@ pub fn schedule() -> usize {
// targeted.
'procfindloop: loop {
pl.rotate_left(1);
// let mut mepc: usize = 0;
// let mut satp: usize = 0;
// let mut pid: usize = 0;
if let Some(prc) = pl.front_mut() {
match prc.get_state() {
ProcessState::Running => {
frame_addr =
prc.get_frame_address();
break 'procfindloop;
// println!("Process is running on frame 0x{:x}", frame_addr);
// satp = prc.get_table_address();
// pid = prc.get_pid() as usize;
},
ProcessState::Sleeping => {
// Awaken sleeping processes whose sleep until is in