Add multithreading to rust code.
This commit is contained in:
parent
19144f7be9
commit
d5a5041c4b
5 changed files with 76 additions and 6 deletions
|
|
@ -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);
|
||||
}};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue