X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/b0d623f7f2ae71ed96e60569f61f9a9a27016e80..7ddcb079202367355dddccdfa4318e57d50318be:/iokit/IOKit/IOWorkLoop.h diff --git a/iokit/IOKit/IOWorkLoop.h b/iokit/IOKit/IOWorkLoop.h index 808329ada..e248a9b3b 100644 --- a/iokit/IOKit/IOWorkLoop.h +++ b/iokit/IOKit/IOWorkLoop.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2007 Apple Inc. All rights reserved. + * Copyright (c) 1998-2009 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -25,14 +25,6 @@ * * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ -/* -Copyright (c) 1998 Apple Computer, Inc. All rights reserved. -HISTORY - 1998-7-13 Godfrey van der Linden(gvdl) - Created. - 1998-10-30 Godfrey van der Linden(gvdl) - Converted to C++ -*/ #ifndef __IOKIT_IOWORKLOOP_H #define __IOKIT_IOWORKLOOP_H @@ -44,6 +36,10 @@ HISTORY #include +#if IOKITSTATS +#include +#endif + class IOEventSource; class IOTimerEventSource; class IOCommandGate; @@ -87,7 +83,14 @@ private: @abstract Static function that calls the threadMain function. */ static void threadMainContinuation(IOWorkLoop *self); - + +/*! @function eventSourcePerformsWork + @abstract Checks if the event source passed in overrides checkForWork() to perform any work. +IOWorkLoop uses this to determine if the event source should be polled in runEventSources() or not. + @param inEventSource The event source to check. +*/ + bool eventSourcePerformsWork(IOEventSource *inEventSource); + protected: /*! @typedef maintCommandEnum @@ -138,6 +141,15 @@ protected: */ struct ExpansionData { IOOptionBits options; + IOEventSource *passiveEventChain; +#if DEBUG + void * allocationBacktrace[16]; +#endif /* DEBUG */ +#if IOKITSTATS + struct IOWorkLoopCounter *counter; +#else + void *iokitstatsReserved; +#endif }; /*! @var reserved @@ -237,13 +249,13 @@ public: /*! @function enableAllInterrupts @abstract Calls enable() in all interrupt event sources. - @discussion For all event sources (ES) for which IODynamicCast(IOInterruptEventSource, ES) is valid, in eventChain call enable() function. See IOEventSource::enable(). + @discussion For all event sources (ES) for which OSDynamicCast(IOInterruptEventSource, ES) is valid, in eventChain call enable() function. See IOEventSource::enable(). */ virtual void enableAllInterrupts() const; /*! @function disableAllInterrupts @abstract Calls disable() in all interrupt event sources. - @discussion For all event sources (ES) for which IODynamicCast(IOInterruptEventSource, ES) is valid, in eventChain call disable() function. See IOEventSource::disable(). + @discussion For all event sources (ES) for which OSDynamicCast(IOInterruptEventSource, ES) is valid, in eventChain call disable() function. See IOEventSource::disable(). */ virtual void disableAllInterrupts() const; @@ -252,6 +264,9 @@ protected: // Internal APIs used by event sources to control the thread friend class IOEventSource; friend class IOTimerEventSource; +#if IOKITSTATS + friend class IOStatistics; +#endif virtual void signalWorkAvailable(); virtual void openGate(); virtual void closeGate();