139 @param action Pointer to function to be executed in work-loop context.
140 @param arg0 Parameter for action parameter, defaults to 0.
141 @param arg1 Parameter for action parameter, defaults to 0.
142 @param arg2 Parameter for action parameter, defaults to 0.
143 @param arg3 Parameter for action parameter, defaults to 0.
144 @result kIOReturnSuccess if successful. kIOReturnBadArgument if action is not defined, kIOReturnNotPermitted if this event source is currently disabled.
151 @abstract Single thread a command with the target work-loop.
152 @discussion Client function that causes the current action to be called in
153a single threaded manner. Beware the work-loop's gate is recursive and command
154gates can cause direct or indirect re-entrancy. When the executing on a
155client's thread attemptCommand will fail if the work-loop's gate is open.
156 @param arg0 Parameter for action of command gate, defaults to 0.
157 @param arg1 Parameter for action of command gate, defaults to 0.
158 @param arg2 Parameter for action of command gate, defaults to 0.
159 @param arg3 Parameter for action of command gate, defaults to 0.
160 @result kIOReturnSuccess if successful. kIOReturnNotPermitted if this event source is currently disabled, kIOReturnNoResources if no action available, kIOReturnCannotLock if lock attempt fails.
166 @abstract Single thread a call to an action with the target work-loop.
167 @discussion Client function that causes the given action to be called in
168a single threaded manner. Beware the work-loop's gate is recursive and command
169gates can cause direct or indirect re-entrancy. When the executing on a
170client's thread attemptCommand will fail if the work-loop's gate is open.
171 @param action Pointer to function to be executed in work-loop context.
172 @param arg0 Parameter for action parameter, defaults to 0.
173 @param arg1 Parameter for action parameter, defaults to 0.
174 @param arg2 Parameter for action parameter, defaults to 0.
175 @param arg3 Parameter for action parameter, defaults to 0.
176 @result kIOReturnSuccess if successful. kIOReturnBadArgument if action is not defined, kIOReturnNotPermitted if this event source is currently disabled, kIOReturnCannotLock if lock attempt fails.
184 @abstract Put a thread that is currently holding the command gate to sleep.
185 @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.
187 @param interruptible THREAD_UNINT, THREAD_INTERRUPTIBLE or THREAD_ABORTSAFE, defaults to THREAD_ABORTSAFE.
188 @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. */