feat(kernel): add Kernel struct, MockPlatform, and simple syscalls (GetTime, GetProcessId, Yield)
This commit is contained in:
@@ -17,7 +17,7 @@ pub struct Capability {
|
||||
}
|
||||
|
||||
impl Capability {
|
||||
pub(crate) fn new(
|
||||
pub fn new(
|
||||
resource: Resource,
|
||||
permissions: PermissionSet,
|
||||
generation: Generation,
|
||||
|
||||
@@ -30,6 +30,10 @@ impl MultiCoreScheduler {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn current(&self, core: CoreId) -> Option<ThreadId> {
|
||||
self.cores[core.raw() as usize].current()
|
||||
}
|
||||
|
||||
fn thread_count_on(&self, core: CoreId) -> usize {
|
||||
self.placements
|
||||
.iter()
|
||||
|
||||
Reference in New Issue
Block a user