Add a kernel crash function, add a timer using the timer interrupt and

set PIT interval to 1000hz, use a vector inside Framebuffer, remove
without_interrupts from the framebuffer and serial console, move to
usize on primitives, add date at boot and turn on multithreading, add a
boot animation and add a test_performance function with the new timer
This commit is contained in:
csd4ni3l
2026-03-28 21:03:13 +01:00
parent 4a3c1c9ced
commit aa5cd85b48
10 changed files with 301 additions and 128 deletions

View File

@@ -1,3 +1,4 @@
use crate::{driver::timer::TIMER, println};
use spin::{Mutex, MutexGuard};
pub struct LinkedNode {
@@ -34,3 +35,10 @@ impl<A> Locked<A> {
self.inner.lock()
}
}
pub fn test_performance<F: FnOnce()>(function: F) {
let start = TIMER.now();
let ret = function();
println!("took {} ms", (TIMER.now() - start).elapsed());
ret
}