chore: remove old flat process.rs and thread.rs replaced by directories
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
use types::{
|
||||
bounded::CapSlot,
|
||||
id::{ProcessId, ThreadId},
|
||||
};
|
||||
|
||||
use crate::capability::CapabilityTable;
|
||||
|
||||
pub const MAX_THREADS_PER_PROCESS: usize = 4;
|
||||
|
||||
pub struct Process {
|
||||
id: ProcessId,
|
||||
capabilities: CapabilityTable,
|
||||
threads: [Option<ThreadId>; MAX_THREADS_PER_PROCESS],
|
||||
fault_handler: Option<CapSlot>,
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
use types::{
|
||||
bounded::{CapSlot, Priority},
|
||||
id::{CoreId, ProcessId, ThreadId},
|
||||
time::TimeSlice,
|
||||
};
|
||||
|
||||
pub struct Thread {
|
||||
id: ThreadId,
|
||||
process: ProcessId,
|
||||
state: ThreadState,
|
||||
saved_context: SavedContext,
|
||||
priority: Priority,
|
||||
time_slice: TimeSlice,
|
||||
core_affinity: Option<CoreId>,
|
||||
}
|
||||
|
||||
pub enum ThreadState {
|
||||
Ready,
|
||||
Running(CoreId),
|
||||
Blocked(BlockReason),
|
||||
Dead,
|
||||
}
|
||||
|
||||
pub struct SavedContext {
|
||||
registers: [usize; 32],
|
||||
}
|
||||
|
||||
pub enum BlockReason {
|
||||
Sending(CapSlot),
|
||||
Receiving(CapSlot),
|
||||
WaitingForInterrupt(CapSlot),
|
||||
WaitingAny,
|
||||
}
|
||||
Reference in New Issue
Block a user