From 017de6704afd94d8681ecceab5397f6e3de1e466 Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Sat, 20 Aug 2022 13:02:22 -0700 Subject: Consolidation --- src/kernel.rs | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'src/kernel.rs') diff --git a/src/kernel.rs b/src/kernel.rs index b0c5104..c25e148 100644 --- a/src/kernel.rs +++ b/src/kernel.rs @@ -39,7 +39,6 @@ use crate::mem::alloc::*; /// the regular main. unsafe fn kernel_init() -> ! { console().init().unwrap(); - U64_QUEUE_ALLOCATOR.init(); ALLOCATOR.init(); kernel_main() } @@ -48,24 +47,11 @@ unsafe fn kernel_init() -> ! { /// /// TODO: Figure out what to do here fn kernel_main() -> ! { - for idx in 0..5 { - if let Some(cell) = U64_QUEUE_ALLOCATOR.alloc() { - let inner = cell.inner(); - *inner = idx; - println!("SUCCESS: Allocated a char! {:?} {:?}", cell, U64_QUEUE_ALLOCATOR); - U64_QUEUE_ALLOCATOR.free(cell); - } else { - println!("ERROR: No more chars remaining! {:?}", U64_QUEUE_ALLOCATOR); - } - } println!("I should be able to print {} here!", 5); { - let a: Box = Box::new(5); + let a: Box = Box::new(u8::MAX); let b: Box = Box::new(5); - let c: Box<(u8,u8,u8)> = Box::new((3,5,8)); - println!("{:?}", a); - println!("{:?}", b); - println!("{:?}", c); + println!("{:?} {:?}", a, b); } loop { } } -- cgit v1.2.1