- @abstract Single thread a call to an action with the target work loop.
- @discussion Client function that causes the given action to be called in
-a single threaded manner. Beware the work loop's gate is recursive and command
-gates can cause direct or indirect re-entrancy. When the executing on a
-client's thread attemptCommand will fail if the work loop's gate is closed.
- @param action Pointer to function to be executed in context of the work loop.
- @param arg0 Parameter for action parameter, defaults to 0.
- @param arg1 Parameter for action parameter, defaults to 0.
- @param arg2 Parameter for action parameter, defaults to 0.
- @param arg3 Parameter for action parameter, defaults to 0.
- @result kIOReturnSuccess if successful. kIOReturnBadArgument if action is not defined, kIOReturnNotPermitted if this event source is currently disabled, kIOReturnCannotLock if lock attempt fails.
-
-*/
- virtual IOReturn attemptAction(Action action,
- void *arg0 = 0, void *arg1 = 0,
- void *arg2 = 0, void *arg3 = 0);
-
-/*! @function commandSleep
- @abstract Put a thread that is currently holding the command gate to sleep.
- @discussion Put a thread to sleep waiting for an event but release the gate first. If the event occurs then the commandGate is closed before the function returns. If the thread does not hold the gate, panic.
- @param event Pointer to an address.
- @param interruptible THREAD_UNINT, THREAD_INTERRUPTIBLE or THREAD_ABORTSAFE. THREAD_UNINT specifies that the sleep cannot be interrupted by a signal. THREAD_INTERRUPTIBLE specifies that the sleep may be interrupted by a "kill -9" signal. THREAD_ABORTSAFE (the default value) specifies that the sleep may be interrupted by any user signal.
- @result THREAD_AWAKENED - normal wakeup, THREAD_TIMED_OUT - timeout expired, THREAD_INTERRUPTED - interrupted, THREAD_RESTART - restart operation entirely. */
- virtual IOReturn commandSleep(void *event,
- UInt32 interruptible = THREAD_ABORTSAFE);
+ * @abstract Single thread a call to an action with the target work loop.
+ * @discussion Client function that causes the given action to be called in
+ * a single threaded manner. Beware the work loop's gate is recursive and command
+ * gates can cause direct or indirect re-entrancy. When the executing on a
+ * client's thread attemptCommand will fail if the work loop's gate is closed.
+ * @param action Pointer to function to be executed in context of the work loop.
+ * @param arg0 Parameter for action parameter, defaults to 0.
+ * @param arg1 Parameter for action parameter, defaults to 0.
+ * @param arg2 Parameter for action parameter, defaults to 0.
+ * @param arg3 Parameter for action parameter, defaults to 0.
+ * @result kIOReturnSuccess if successful. kIOReturnBadArgument if action is not defined, kIOReturnNotPermitted if this event source is currently disabled, kIOReturnCannotLock if lock attempt fails.
+ *
+ */
+ virtual IOReturn attemptAction(Action action,
+ void *arg0 = NULL, void *arg1 = NULL,
+ void *arg2 = NULL, void *arg3 = NULL);
+
+/*! @function commandSleep
+ * @abstract Put a thread that is currently holding the command gate to sleep.
+ * @discussion Put a thread to sleep waiting for an event but release the gate first. If the event occurs then the commandGate is closed before the function returns. If the thread does not hold the gate, panic.
+ * @param event Pointer to an address.
+ * @param interruptible THREAD_UNINT, THREAD_INTERRUPTIBLE or THREAD_ABORTSAFE. THREAD_UNINT specifies that the sleep cannot be interrupted by a signal. THREAD_INTERRUPTIBLE specifies that the sleep may be interrupted by a "kill -9" signal. THREAD_ABORTSAFE (the default value) specifies that the sleep may be interrupted by any user signal.
+ * @result THREAD_AWAKENED - normal wakeup, THREAD_TIMED_OUT - timeout expired, THREAD_INTERRUPTED - interrupted, THREAD_RESTART - restart operation entirely. */
+ virtual IOReturn commandSleep(void *event,
+ UInt32 interruptible = THREAD_ABORTSAFE);