diff --git a/oro-kernel/src/lib.rs b/oro-kernel/src/lib.rs index f089496..67f55a0 100644 --- a/oro-kernel/src/lib.rs +++ b/oro-kernel/src/lib.rs @@ -46,17 +46,13 @@ pub mod thread; use core::mem::MaybeUninit; use oro_macro::assert; -// NOTE(qix-): Bug in Rustfmt where it keeps treating `vec![]` and the `mod vec` -// NOTE(qix-): as the same, rearranging imports and breaking code. Super annoying. -#[rustfmt::skip] use oro_mem::{ alloc::{ sync::{Arc, Weak}, - vec, vec::Vec, }, global_alloc::GlobalPfa, - mapper::{AddressSegment, MapError, AddressSpace as _}, + mapper::{AddressSegment, AddressSpace as _, MapError}, pfa::Alloc, }; use oro_sync::{Lock, ReentrantMutex, TicketMutex}; @@ -218,8 +214,6 @@ impl Kernel { pub struct KernelState { /// List of all modules. modules: TicketMutex>>>>, - /// List of all rings. - rings: TicketMutex>>>>, /// List of all threads. threads: TicketMutex>>>, @@ -252,7 +246,6 @@ impl KernelState { let registry = Arc::new(ReentrantMutex::new(RootRegistry::new_empty())); let root_ring = ring::Ring::::new_root(registry.clone())?; - let root_ring_weak = Arc::downgrade(&root_ring); // Install root ring interfaces. { @@ -278,7 +271,6 @@ impl KernelState { this.write(Self { root_ring, modules: TicketMutex::default(), - rings: TicketMutex::new(vec![root_ring_weak]), threads: TicketMutex::default(), registry, }); diff --git a/oro-kernel/src/ring.rs b/oro-kernel/src/ring.rs index 41fa1a6..fb480d0 100644 --- a/oro-kernel/src/ring.rs +++ b/oro-kernel/src/ring.rs @@ -77,12 +77,6 @@ impl Ring { parent.lock().children.push(r.clone()); - Kernel::::get() - .state() - .rings - .lock() - .push(Arc::downgrade(&r)); - Ok(r) }