mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 10:53:25 +00:00
Refactor the API of spinlocks
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
0160a85ccd
commit
c44447d54b
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user