diff --git a/oro-kernel/src/lib.rs b/oro-kernel/src/lib.rs index 67f55a0..3e42f86 100644 --- a/oro-kernel/src/lib.rs +++ b/oro-kernel/src/lib.rs @@ -47,10 +47,7 @@ use core::mem::MaybeUninit; use oro_macro::assert; use oro_mem::{ - alloc::{ - sync::{Arc, Weak}, - vec::Vec, - }, + alloc::{sync::Arc, vec::Vec}, global_alloc::GlobalPfa, mapper::{AddressSegment, AddressSpace as _, MapError}, pfa::Alloc, @@ -212,17 +209,13 @@ impl Kernel { /// Global state shared by all [`Kernel`] instances across /// core boot/powerdown/bringup cycles. pub struct KernelState { - /// List of all modules. - modules: TicketMutex>>>>, /// List of all threads. - threads: TicketMutex>>>, - + threads: TicketMutex>>>, /// The root ring. root_ring: Arc>>, - /// The system-wide registry, loaded at boot with all of the "static" kernel /// interfaces. - registry: Arc>>, + registry: Arc>>, } impl KernelState { @@ -270,7 +263,6 @@ impl KernelState { this.write(Self { root_ring, - modules: TicketMutex::default(), threads: TicketMutex::default(), registry, }); diff --git a/oro-kernel/src/module.rs b/oro-kernel/src/module.rs index 96968f8..97b215f 100644 --- a/oro-kernel/src/module.rs +++ b/oro-kernel/src/module.rs @@ -11,7 +11,7 @@ use oro_mem::{ }; use oro_sync::{Lock, ReentrantMutex}; -use crate::{AddressSpace, Kernel, UserHandle, arch::Arch, instance::Instance}; +use crate::{AddressSpace, UserHandle, arch::Arch, instance::Instance}; /// A singular executable module. /// @@ -56,12 +56,6 @@ impl Module { entry_points: Vec::new(), })); - Kernel::::get() - .state() - .modules - .lock() - .push(Arc::downgrade(&r)); - Ok(r) }