IOCommandGate
Single-threaded work-loop client request mechanism.
Declaration
class IOCommandGate : IOEventSourceOverview
An IOCommandGate instance is an extremely lightweight mechanism that executes an action on the driver's work-loop. 'On the work-loop' is actually a lie but the work-loop single threaded semantic is maintained for this event source. Using the work-loop gate rather than execution by the workloop. The command gate tests for a potential self dead lock by checking if the runCommand request is made from the work-loop's thread, it doesn't check for a mutual dead lock though where a pair of work loop's dead lock each other.
The IOCommandGate is a lighter weight version of the IOCommandQueue and should be used in preference. Generally use a command queue whenever you need a client to submit a request to a work loop. A typical command gate action would check if the hardware is active, if so it will add the request to a pending queue internal to the device or the device's family. Otherwise if the hardware is inactive then this request can be acted upon immediately.
CAUTION: The runAction, runCommand, and attemptCommand functions cannot be called from an interrupt context.
Topics
Miscellaneous
attemptActionattemptCommandcommandGatecommandSleep(void *, AbsoluteTime, UInt32)commandSleep(void *, UInt32)commandWakeupdisableenableinitrunActionrunCommand
Callbacks
DataTypes
Instance Variables
Instance Methods
attemptActionattemptCommandcommandSleepcommandSleepcommandWakeupdisableenablefreegetMetaClassinitrunActionrunActionBlockrunCommandsetWorkLoop