- @class IOTimerEventSource : public IOEventSource
- @abstract Time based event source mechanism.
- @discussion An event source that implements a simple timer. A timeout handler is called once the timeout period expires. This timeout handler will be called by the work-loop that this event source is attached to.
-<br><br>
- Usually a timer event source will be used to implement a timeout. In general when a driver makes a request it will need to setup a call to keep track of when the I/O doesn't complete. This class is designed to make that somewhat easier.
-<br><br>
- Remember the system doesn't guarantee the accuracy of the callout. It is possible that a higher priority thread is running which will delay the execution of the action routine. In fact the thread will be made runable at the exact requested time, within the accuracy of the CPU's decrementer based interrupt, but the scheduler will then control execution.
-*/
+ * @enum IOTimerEventSource constructor options
+ * @abstract Constants defining behavior of the IOTimerEventSource.
+ * @constant kIOTimerEventSourceOptionsPriorityHigh Importance above everything but realtime.
+ * Thread calls allocated with this priority execute at extremely high priority,
+ * above everything but realtime threads. They are generally executed in serial.
+ * Though they may execute concurrently under some circumstances, no fan-out is implied.
+ * These work items should do very small amounts of work or risk disrupting system
+ * responsiveness.
+ * @constant kIOTimerEventSourceOptionsPriorityKernelHigh Importance higher than most kernel
+ * threads.
+ * @constant kIOTimerEventSourceOptionsPriorityKernel Importance similar to that of normal kernel
+ * threads.
+ * @constant kIOTimerEventSourceOptionsPriorityUser Importance similar to that of normal user threads.
+ * @constant kIOTimerEventSourceOptionsPriorityLow Very low importance.
+ * @constant kIOTimerEventSourceOptionsPriorityWorkLoop Run the callout on the thread of the IOWorkLoop
+ * the event source has been added to.
+ * @constant kIOTimerEventSourceOptionsAllowReenter Allow the callout to be rescheduled and potentially
+ * re-entered, if the IOWorkLoop lock has been released (eg. with commandSleep) during its invocation.
+ * @constant kIOTimerEventSourceOptionsDefault Recommended default options.
+ */
+enum{
+ kIOTimerEventSourceOptionsPriorityMask = 0x000000ff,
+ kIOTimerEventSourceOptionsPriorityHigh = 0x00000000,
+ kIOTimerEventSourceOptionsPriorityKernelHigh = 0x00000001,
+ kIOTimerEventSourceOptionsPriorityKernel = 0x00000002,
+ kIOTimerEventSourceOptionsPriorityUser = 0x00000003,
+ kIOTimerEventSourceOptionsPriorityLow = 0x00000004,
+ kIOTimerEventSourceOptionsPriorityWorkLoop = 0x000000ff,
+
+ kIOTimerEventSourceOptionsAllowReenter = 0x00000100,
+
+ kIOTimerEventSourceOptionsDefault = kIOTimerEventSourceOptionsPriorityKernelHigh
+};
+
+#define IOTIMEREVENTSOURCEOPTIONS_DEFINED 1
+
+/*!
+ * @enum IOTimerEventSource setTimeout/wakeAtTime options
+ * @abstract Constants defining behavior of a scheduled call from IOTimerEventSource.
+ * @constant kIOTimeOptionsWithLeeway Use the leeway parameter to the call.
+ * @constant kIOTimeOptionsContinuous Use mach_continuous_time() to generate the callback.
+ */
+enum{
+ kIOTimeOptionsWithLeeway = 0x00000020,
+ kIOTimeOptionsContinuous = 0x00000100,
+};
+
+/*!
+ * @class IOTimerEventSource : public IOEventSource
+ * @abstract Time based event source mechanism.
+ * @discussion An event source that implements a simple timer. A timeout handler is called once the timeout period expires. This timeout handler will be called by the work-loop that this event source is attached to.
+ * <br><br>
+ * Usually a timer event source will be used to implement a timeout. In general when a driver makes a request it will need to setup a call to keep track of when the I/O doesn't complete. This class is designed to make that somewhat easier.
+ * <br><br>
+ * Remember the system doesn't guarantee the accuracy of the callout. It is possible that a higher priority thread is running which will delay the execution of the action routine. In fact the thread will be made runable at the exact requested time, within the accuracy of the CPU's decrementer based interrupt, but the scheduler will then control execution.
+ */
+