kernel/arm64: align interrupt postlude with other architectures
Change-Id: I0a5325f163d2ca99bfdaa35d7addedcfdc16ff9a Reviewed-on: https://review.haiku-os.org/c/haiku/+/6178 Reviewed-by: waddlesplash <waddlesplash@gmail.com> Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This commit is contained in:
parent
6d9b21e897
commit
e490b6343a
@ -175,10 +175,22 @@ void
|
||||
after_exception()
|
||||
{
|
||||
Thread* thread = thread_get_current_thread();
|
||||
cpu_status state = disable_interrupts();
|
||||
if (thread->cpu->invoke_scheduler) {
|
||||
disable_interrupts();
|
||||
SpinLocker schedulerLocker(thread->scheduler_lock);
|
||||
scheduler_reschedule(B_THREAD_READY);
|
||||
schedulerLocker.Unlock();
|
||||
restore_interrupts(state);
|
||||
} else if (thread->post_interrupt_callback != NULL) {
|
||||
void (*callback)(void*) = thread->post_interrupt_callback;
|
||||
void* data = thread->post_interrupt_data;
|
||||
|
||||
thread->post_interrupt_callback = NULL;
|
||||
thread->post_interrupt_data = NULL;
|
||||
|
||||
restore_interrupts(state);
|
||||
|
||||
callback(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user