mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fix Clock::LockLock setting we_disabled_interrupts before disabling interrupts.
This commit is contained in:
parent
5be7b52422
commit
ab228e1062
1 changed files with 7 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013, 2016, 2017 Jonas 'Sortie' Termansen.
|
||||
* Copyright (c) 2013, 2016, 2017, 2018 Jonas 'Sortie' Termansen.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
@ -78,8 +78,13 @@ void Clock::LockClock()
|
|||
{
|
||||
if ( clock_callable_from_interrupt )
|
||||
{
|
||||
if ( (we_disabled_interrupts = Interrupt::IsEnabled()) )
|
||||
if ( Interrupt::IsEnabled() )
|
||||
{
|
||||
Interrupt::Disable();
|
||||
we_disabled_interrupts = true;
|
||||
}
|
||||
else
|
||||
we_disabled_interrupts = false;
|
||||
}
|
||||
else
|
||||
kthread_mutex_lock(&clock_mutex);
|
||||
|
|
Loading…
Reference in a new issue