mirror of
https://github.com/XunilGroup/XunilOS.git
synced 2026-06-02 13:44:25 +02:00
Add correct framebuffer mapping, so Doom works again, remove unneded
code, add cooperative scheduling on syscalls determined by the reschedule flag, make serial console automatically clear and be a single render, make process_scancodes push to all processes, add a user-facing framebuffer to be mapped, automatically swap buffers inside timer interrupt, update all submodules
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
use alloc::vec::Vec;
|
||||
|
||||
use crate::{driver::keyboard::KeyboardEvent, mm::address_space::AddressSpace};
|
||||
use crate::{
|
||||
driver::keyboard::KeyboardEvent, mm::address_space::AddressSpace, task::context::UserContext,
|
||||
};
|
||||
|
||||
pub enum ProcessState {
|
||||
Ready,
|
||||
@@ -9,6 +11,12 @@ pub enum ProcessState {
|
||||
Zombie,
|
||||
}
|
||||
|
||||
pub struct ProcessInfo {
|
||||
pub exit_code: usize,
|
||||
pub parent: usize,
|
||||
pub wake_tick: Option<u64>,
|
||||
}
|
||||
|
||||
pub struct Process {
|
||||
pub pid: u64,
|
||||
pub state: ProcessState,
|
||||
@@ -17,7 +25,10 @@ pub struct Process {
|
||||
pub heap_end: u64,
|
||||
pub kbd_buffer: Vec<KeyboardEvent>,
|
||||
pub address_space: Option<AddressSpace>,
|
||||
pub saved_ctx: Option<UserContext>,
|
||||
pub should_reschedule: bool,
|
||||
pub user_entry: u64,
|
||||
pub info: ProcessInfo,
|
||||
}
|
||||
impl Process {
|
||||
pub fn new(
|
||||
@@ -35,7 +46,14 @@ impl Process {
|
||||
heap_end,
|
||||
kbd_buffer: Vec::new(),
|
||||
address_space: None,
|
||||
saved_ctx: None,
|
||||
should_reschedule: false,
|
||||
user_entry,
|
||||
info: ProcessInfo {
|
||||
exit_code: 0,
|
||||
parent: 0,
|
||||
wake_tick: None,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user