142 @param action Pointer to function to be executed in work-loop context.
143 @param arg0 Parameter for action parameter, defaults to 0.
144 @param arg1 Parameter for action parameter, defaults to 0.
145 @param arg2 Parameter for action parameter, defaults to 0.
146 @param arg3 Parameter for action parameter, defaults to 0.
147 @result kIOReturnSuccess if successful. kIOReturnBadArgument if action is not defined, kIOReturnNotPermitted if this event source is currently disabled.
154 @abstract Single thread a command with the target work-loop.
155 @discussion Client function that causes the current action to be called in
156a single threaded manner. Beware the work-loop's gate is recursive and command
157gates can cause direct or indirect re-entrancy. When the executing on a
158client's thread attemptCommand will fail if the work-loop's gate is open.
159 @param arg0 Parameter for action of command gate, defaults to 0.
160 @param arg1 Parameter for action of command gate, defaults to 0.
161 @param arg2 Parameter for action of command gate, defaults to 0.
162 @param arg3 Parameter for action of command gate, defaults to 0.
163 @result kIOReturnSuccess if successful. kIOReturnNotPermitted if this event source is currently disabled, kIOReturnNoResources if no action available, kIOReturnCannotLock if lock attempt fails.
169 @abstract Single thread a call to an action with the target work-loop.
170 @discussion Client function that causes the given action to be called in
171a single threaded manner. Beware the work-loop's gate is recursive and command
172gates can cause direct or indirect re-entrancy. When the executing on a
173client's thread attemptCommand will fail if the work-loop's gate is open.
174 @param action Pointer to function to be executed in work-loop context.
175 @param arg0 Parameter for action parameter, defaults to 0.
176 @param arg1 Parameter for action parameter, defaults to 0.
177 @param arg2 Parameter for action parameter, defaults to 0.
178 @param arg3 Parameter for action parameter, defaults to 0.
179 @result kIOReturnSuccess if successful. kIOReturnBadArgument if action is not defined, kIOReturnNotPermitted if this event source is currently disabled, kIOReturnCannotLock if lock attempt fails.
187 @abstract Put a thread that is currently holding the command gate to sleep.
188 @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 returns.
190 @param interruptible THREAD_UNINT, THREAD_INTERRUPTIBLE or THREAD_ABORTSAFE, defaults to THREAD_ABORTSAFE.
191 @result THREAD_AWAKENED - normal wakeup, THREAD_TIMED_OUT - timeout expired, THREAD_INTERRUPTED - interrupted by clear_wait, THREAD_RESTART - restart operation entirely, kIOReturnNotPermitted if the calling thread does not hold the command gate. */