Change time offset to RwLock
This commit is contained in:
@@ -169,7 +169,7 @@ interrupt_stack!(pit_stack, |_stack| {
|
||||
|
||||
let mut token = unsafe { CleanLockToken::new() };
|
||||
{
|
||||
*time::OFFSET.lock(token.token()) += pit::RATE;
|
||||
*time::OFFSET.write(token.token()) += pit::RATE;
|
||||
}
|
||||
|
||||
unsafe { eoi(0) };
|
||||
|
||||
@@ -12,7 +12,8 @@ pub fn monotonic_absolute(token: &mut CleanLockToken) -> u128 {
|
||||
return ns;
|
||||
}
|
||||
|
||||
*crate::time::OFFSET.lock(token.token()) + hpet_or_pit()
|
||||
let offset = { *crate::time::OFFSET.read(token.token()) };
|
||||
offset + hpet_or_pit()
|
||||
}
|
||||
fn hpet_or_pit() -> u128 {
|
||||
#[cfg(feature = "acpi")]
|
||||
|
||||
Reference in New Issue
Block a user