Add multithreading to rust code.

This commit is contained in:
Drew Galbraith 2024-07-28 19:02:03 -07:00
parent 19144f7be9
commit d5a5041c4b
5 changed files with 76 additions and 6 deletions

View file

@ -138,10 +138,10 @@ impl fmt::Write for Writer {
#[macro_export]
macro_rules! debug {
() => {
debug("");
$crate::syscall::debug("");
};
($fmt:literal) => {
debug($fmt);
$crate::syscall::debug($fmt);
};
($fmt:literal, $($val:expr),+) => {{
use core::fmt::Write as _;
@ -149,6 +149,6 @@ macro_rules! debug {
let mut w = $crate::syscall::Writer::new();
write!(&mut w, $fmt, $($val),*).expect("Failed to format");
let s: String = w.into();
debug(&s);
$crate::syscall::debug(&s);
}};
}