diff --git a/src/runtime/src/kernel.rs b/src/runtime/src/kernel.rs index 8539b210..e5101f17 100644 --- a/src/runtime/src/kernel.rs +++ b/src/runtime/src/kernel.rs @@ -325,6 +325,7 @@ pub fn main_core1() { let mut current_modinit: Option = None; let mut current_typeinfo: Option = None; + let mut library_handle: Option = None; loop { let message = core1_rx.recv(); match *message { @@ -351,6 +352,7 @@ pub fn main_core1() { dcci_slice(library.image.data); core1_tx.send(Message::LoadCompleted); + library_handle = Some(library); }, Err(error) => { error!("failed to load shared library: {}", error); @@ -372,6 +374,7 @@ pub fn main_core1() { KERNEL_CHANNEL_1TO0 = ptr::null_mut(); } } + library_handle = None; info!("kernel finished"); core1_tx.send(Message::KernelFinished); }