Previously, the disable_interrupts_then function would globally disable interrupts, run some code, then it would globally enable interrupts. This worked well for the initial use case of disabling interrupts before initializing the PIC.
However, we ran into an issue where nested disable_interrupts_then calls would enable interrupts globally in places where we didn't expect it. The behavior I actually wanted was as follows:
Disable interrupts globally
Run critical section of kernel
Restore interrupts to previous state before step 1
Minor Changes
There were some minor changes involving compiler warnings and travis. Also, it was determined that using drop(&process.kstack) would actually leak data, so we switch back to process.kstack = None in our Scheduler.kill() method.
disable_then_restore
Previously, the
disable_interrupts_then
function would globally disable interrupts, run some code, then it would globally enable interrupts. This worked well for the initial use case of disabling interrupts before initializing the PIC.However, we ran into an issue where nested
disable_interrupts_then
calls would enable interrupts globally in places where we didn't expect it. The behavior I actually wanted was as follows:step 1
Minor Changes
There were some minor changes involving compiler warnings and travis. Also, it was determined that using
drop(&process.kstack)
would actually leak data, so we switch back toprocess.kstack = None
in ourScheduler.kill()
method.