From c8375b00177bbfa9f3741bcae2570e8ec1c85fc6 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Sun, 14 Jul 2019 14:27:30 -0400 Subject: [PATCH] XHCI: Tweak priorities a bit more. Put the EventThread as URGENT_PRIORITY and the downstream FinishThread as URGENT - 1. Hopefully this will serve as a better hint to the scheduler as to what we want to occur here. --- src/add-ons/kernel/busses/usb/xhci.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/add-ons/kernel/busses/usb/xhci.cpp b/src/add-ons/kernel/busses/usb/xhci.cpp index 079823dcdc..07ae2a6641 100644 --- a/src/add-ons/kernel/busses/usb/xhci.cpp +++ b/src/add-ons/kernel/busses/usb/xhci.cpp @@ -359,15 +359,15 @@ XHCI::XHCI(pci_info *info, Stack *stack) return; } - // create finisher service thread - fFinishThread = spawn_kernel_thread(FinishThread, "xhci finish thread", + // create event handler thread + fEventThread = spawn_kernel_thread(EventThread, "xhci event thread", B_URGENT_PRIORITY, (void *)this); - resume_thread(fFinishThread); + resume_thread(fEventThread); // create finisher service thread - fEventThread = spawn_kernel_thread(EventThread, "xhci event thread", - B_URGENT_DISPLAY_PRIORITY, (void *)this); - resume_thread(fEventThread); + fFinishThread = spawn_kernel_thread(FinishThread, "xhci finish thread", + B_URGENT_PRIORITY - 1, (void *)this); + resume_thread(fFinishThread); // Find the right interrupt vector, using MSIs if available. fIRQ = fPCIInfo->u.h0.interrupt_line;