forked from M-Labs/artiq
runtime: clear async RPC queue when kernel stops (fixes #631).
This commit is contained in:
parent
852598c491
commit
5b7e068157
@ -21,9 +21,11 @@ pub unsafe fn start() {
|
||||
rpc_queue::init();
|
||||
}
|
||||
|
||||
pub fn stop() {
|
||||
unsafe { csr::kernel_cpu::reset_write(1) }
|
||||
pub unsafe fn stop() {
|
||||
csr::kernel_cpu::reset_write(1);
|
||||
|
||||
mailbox::acknowledge();
|
||||
rpc_queue::init();
|
||||
}
|
||||
|
||||
pub fn validate(ptr: usize) -> bool {
|
||||
|
@ -92,7 +92,7 @@ impl<'a> Session<'a> {
|
||||
|
||||
impl<'a> Drop for Session<'a> {
|
||||
fn drop(&mut self) {
|
||||
kernel::stop()
|
||||
unsafe { kernel::stop() }
|
||||
}
|
||||
}
|
||||
|
||||
@ -416,7 +416,7 @@ fn process_kern_message(waiter: Waiter,
|
||||
}
|
||||
|
||||
&kern::RunFinished => {
|
||||
kernel::stop();
|
||||
unsafe { kernel::stop() }
|
||||
session.kernel_state = KernelState::Absent;
|
||||
unsafe { session.congress.cache.unborrow() }
|
||||
|
||||
@ -428,7 +428,7 @@ fn process_kern_message(waiter: Waiter,
|
||||
}
|
||||
|
||||
&kern::RunException { exception: ref exn, backtrace } => {
|
||||
kernel::stop();
|
||||
unsafe { kernel::stop() }
|
||||
session.kernel_state = KernelState::Absent;
|
||||
unsafe { session.congress.cache.unborrow() }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user