X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/8f6c56a50524aa785f7e596d52dddfb331e18961..04b8595b18b1b41ac7a206e4b3d51a635f8413d7:/iokit/Kernel/IOCommandPool.cpp diff --git a/iokit/Kernel/IOCommandPool.cpp b/iokit/Kernel/IOCommandPool.cpp index 3bddd5b8a..2a3b6e71b 100644 --- a/iokit/Kernel/IOCommandPool.cpp +++ b/iokit/Kernel/IOCommandPool.cpp @@ -147,9 +147,10 @@ IOCommandPool::getCommand(bool blockForCommand) IOReturn result = kIOReturnSuccess; IOCommand *command = 0; - result = fSerializer->runAction((IOCommandGate::Action) - &IOCommandPool::gatedGetCommand, - (void *) &command, (void *) blockForCommand); + IOCommandGate::Action func = OSMemberFunctionCast( + IOCommandGate::Action, this, &IOCommandPool::gatedGetCommand); + result = fSerializer-> + runAction(func, (void *) &command, (void *) blockForCommand); if (kIOReturnSuccess == result) return command; else @@ -186,8 +187,9 @@ gatedGetCommand(IOCommand **command, bool blockForCommand) void IOCommandPool:: returnCommand(IOCommand *command) { - (void) fSerializer->runAction((IOCommandGate::Action) - &IOCommandPool::gatedReturnCommand, (void *) command); + IOCommandGate::Action func = OSMemberFunctionCast( + IOCommandGate::Action, this, &IOCommandPool::gatedReturnCommand); + (void) fSerializer->runAction(func, (void *) command); } @@ -199,7 +201,7 @@ returnCommand(IOCommand *command) IOReturn IOCommandPool:: gatedReturnCommand(IOCommand *command) { - queue_enter(&fQueueHead, command, IOCommand *, fCommandChain); + queue_enter_first(&fQueueHead, command, IOCommand *, fCommandChain); if (fSleepers) { fSerializer->commandWakeup(&fSleepers, /* oneThread */ true); fSleepers--;