pub fn handle_thread_termination<K: Kernel>(kernel: K, from_userspace: bool)Expand description
Handle conditional termination of interrupted thread
Checks if the current thread is terminating and was interrupted from userspace. If so, exit the thread.
This should be called when returning to interrupt or exception.