mirror of
https://github.com/XunilGroup/XunilOS.git
synced 2026-06-02 13:44:25 +02:00
Add correct sleep which works now because interrupts are re-enabled
using sti in syscalls, remove a bunch of old imports and code, move keyboard scancode handling to keyboard.rs, add a new KeyboardEvent based layout where press/release and unicode is handled, add a kbd_read syscall which writes kbd events to a userspace buffer, add a usercopy file which provides safe copying functions to userspace
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
use crate::{arch::x86_64::paging::XunilFrameAllocator, mm::address_space::AddressSpace};
|
||||
use alloc::vec::Vec;
|
||||
|
||||
enum ProcessState {
|
||||
use crate::{driver::keyboard::KeyboardEvent, mm::address_space::AddressSpace};
|
||||
|
||||
pub enum ProcessState {
|
||||
Ready,
|
||||
Running,
|
||||
Blocked,
|
||||
@@ -10,10 +12,10 @@ enum ProcessState {
|
||||
pub struct Process {
|
||||
pub pid: u64,
|
||||
pub state: ProcessState,
|
||||
// cpu_ctx: &[u8],
|
||||
pub stack_top: u64,
|
||||
pub heap_base: u64,
|
||||
pub heap_end: u64,
|
||||
pub kbd_buffer: Vec<KeyboardEvent>,
|
||||
pub address_space: AddressSpace,
|
||||
pub user_entry: u64,
|
||||
}
|
||||
@@ -33,6 +35,7 @@ impl Process {
|
||||
state: ProcessState::Ready,
|
||||
heap_base,
|
||||
heap_end,
|
||||
kbd_buffer: Vec::new(),
|
||||
address_space,
|
||||
user_entry,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user