Skip to content

Commit

Permalink
Correct IOCommandGate::commandSleep call
Browse files Browse the repository at this point in the history
IOCommandGate::commandSleep has the following signatures:

virtual IOReturn commandSleep(
 void *event,
 AbsoluteTime deadline,
 UInt32 interruptible);

virtual IOReturn commandSleep(
 void *event,
 UInt32 interruptible);

Previously, commandSleep was called with 2 arguments, with the deadline
being passed in as interruptible, which is incorrect. Explicitly pass
THREAD_UNINT for interruptible to use the first signature and correctly
specify the deadline.
  • Loading branch information
al3xtjames committed Oct 26, 2019
1 parent a374689 commit 33dae47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion VoodooI2CHID/VoodooI2CHIDDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ IOReturn VoodooI2CHIDDevice::resetHIDDeviceGated() {

read_in_progress = false;

IOReturn sleep = command_gate->commandSleep(&reset_event, absolute_time);
IOReturn sleep = command_gate->commandSleep(&reset_event, absolute_time, THREAD_UNINT);

if (sleep == THREAD_TIMED_OUT) {
IOLog("%s::%s Timeout waiting for device to complete host initiated reset\n", getName(), name);
Expand Down

0 comments on commit 33dae47

Please sign in to comment.