Refactor the API of spinlocks

This commit is contained in:
Cautreoxit
2024-08-09 03:32:27 +00:00
committed by Tate, Hongliang Tian
parent 0160a85ccd
commit c44447d54b
38 changed files with 345 additions and 259 deletions

View File

@ -59,7 +59,7 @@ impl log::Log for Logger {
// Use a global lock to prevent interleaving of log messages.
use crate::sync::SpinLock;
static RECORD_LOCK: SpinLock<()> = SpinLock::new(());
let _lock = RECORD_LOCK.lock_irq_disabled();
let _lock = RECORD_LOCK.disable_irq().lock();
early_println!("{} {}: {}", timestamp, level, record_str);
}