rem: state = disable_interrupts(); GRAB_THREAD_LOCK();
add: if (handle_signals(thread)) { state = disable_interrupts(); GRAB_THREAD_LOCK();
context: thread_at_kernel_exit(void){	struct thread *thread = thread_get_current_thread();	cpu_status state;	bigtime_t now;	TRACE(("thread_atkernel_exit: exit thread 0x%lx\n", thread->id));	state = disable_interrupts();	GRAB_THREAD_LOCK();	if (handle_signals(thread, &state))		scheduler_reschedule();	// was: smp_send_broadcast_ici(SMP_MSG_RESCHEDULE, 0, 0, 0, NULL, SMP_MSG_FLAG_SYNC);	thread->in_kernel = false;	RELEASE_THREAD_LOCK();	// track kernel time	now = system_time();	thread->kernel_time += now - thread->last_time;	thread->last_time = now;	restore_interrupts(state);}