X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/6d2010ae8f7a6078e10b361c6962983bab233e0f..04b8595b18b1b41ac7a206e4b3d51a635f8413d7:/iokit/Kernel/IOWorkLoop.cpp diff --git a/iokit/Kernel/IOWorkLoop.cpp b/iokit/Kernel/IOWorkLoop.cpp index 51045a234..0789f66bb 100644 --- a/iokit/Kernel/IOWorkLoop.cpp +++ b/iokit/Kernel/IOWorkLoop.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #define super OSObject @@ -143,11 +144,6 @@ bool IOWorkLoop::init() workToDo = false; } - if (!reserved) { - reserved = IONew(ExpansionData, 1); - reserved->options = 0; - } - IOStatisticsRegisterCounter(); if ( controlG == NULL ) { @@ -177,6 +173,7 @@ bool IOWorkLoop::init() return false; } + (void) thread_set_tag(workThread, THREAD_TAG_IOWORKLOOP); return true; } @@ -556,6 +553,8 @@ IOReturn IOWorkLoop::_maintRequest(void *inC, void *inD, void *, void *) case mRemoveEvent: if (inEvent->getWorkLoop()) { + IOStatisticsDetachEventSource(); + if (eventSourcePerformsWork(inEvent)) { if (eventChain == inEvent) eventChain = inEvent->getNext(); @@ -595,7 +594,6 @@ IOReturn IOWorkLoop::_maintRequest(void *inC, void *inD, void *, void *) inEvent->setNext(0); inEvent->release(); SETP(&fFlags, kLoopRestart); - IOStatisticsDetachEventSource(); } break;