- @discussion Consists of the inner 2 loops of the threadMain function(qv).
- The outer loop terminates when there is no more work, and the inside loop
- walks the event list calling the checkForWork method in each event source.
- If an event source has more work to do, it can set the more flag and the
- outer loop will repeat.
-<br><br>
- This function can be used to clear a priority inversion between the normal
- workloop thread and multimedia's real time threads. The problem is that
- the interrupt action routine is often held off by high priority threads.
- So if they want to get their data now they will have to call us and ask if
- any data is available. The multi-media user client will arrange for this
- function to be called, which causes any pending interrupts to be processed
- and the completion routines called. By the time the function returns all
- outstanding work will have been completed at the real time threads
- priority.
-
- @result Return false if the work loop is shutting down, true otherwise.
-*/
- virtual bool runEventSources();
+ * @discussion Consists of the inner 2 loops of the threadMain function(qv).
+ * The outer loop terminates when there is no more work, and the inside loop
+ * walks the event list calling the checkForWork method in each event source.
+ * If an event source has more work to do, it can set the more flag and the
+ * outer loop will repeat.
+ * <br><br>
+ * This function can be used to clear a priority inversion between the normal
+ * workloop thread and multimedia's real time threads. The problem is that
+ * the interrupt action routine is often held off by high priority threads.
+ * So if they want to get their data now they will have to call us and ask if
+ * any data is available. The multi-media user client will arrange for this
+ * function to be called, which causes any pending interrupts to be processed
+ * and the completion routines called. By the time the function returns all
+ * outstanding work will have been completed at the real time threads
+ * priority.
+ *
+ * @result Return false if the work loop is shutting down, true otherwise.
+ */
+ virtual bool runEventSources();
+
+/*! @function setMaximumLockTime
+ * @discussion For diagnostics use in DEVELOPMENT kernels, set a time interval which if the work loop lock is held for this time or greater, IOWorkLoop will panic or log a backtrace.
+ * @param interval An absolute time interval, eg. created with clock_interval_to_absolutetime_interval().
+ * @param options Pass IOWorkLoop::kTimeLockPanics to panic when the time is exceeded, otherwise a log will be generated with OSReportWithBacktrace().
+ */
+ void setMaximumLockTime(uint64_t interval, uint32_t options);