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
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);
}
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--;