diff -r 2d65c2f76d7b -r 947f0dc9f7a8 kernel/eka/include/nkern/nkern.h --- a/kernel/eka/include/nkern/nkern.h Tue Feb 02 01:24:03 2010 +0200 +++ b/kernel/eka/include/nkern/nkern.h Fri Apr 16 16:24:37 2010 +0300 @@ -36,7 +36,7 @@ /** @internalComponent */ IMPORT_C void NKFault(const char* file, TInt line); /** @internalComponent */ -void NKIdle(TInt aStage); +void NKIdle(TUint32 aStage); } /** @@ -715,13 +715,14 @@ Pointer to a function which is called whenever a CPU goes idle @param aPtr The iPtr stored in the SCpuIdleHandler structure - @param aStage If positive, the number of processors still active - If zero, indicates all processors are now idle - -1 indicates that postamble processing is required after waking up + @param aStage Bits 0-7 give a bitmask of CPUs now active, i.e. 0 means all processors now idle + Bit 31 set indicates that the current core can now be powered down + Bit 30 set indicates that other cores still remain to be retired + Bit 29 set indicates that postamble processing is required after waking up @internalComponent */ -typedef void (*TCpuIdleHandlerFn)(TAny* aPtr, TInt aStage); +typedef void (*TCpuIdleHandlerFn)(TAny* aPtr, TUint32 aStage); /** Idle handler structure @@ -729,6 +730,17 @@ */ struct SCpuIdleHandler { + /** + Defined flag bits in aStage parameter + */ + enum + { + EActiveCpuMask=0xFFu, + EPostamble=1u<<29, // postamble needed + EMore=1u<<30, // more cores still to be retired + ERetire=1u<<31, // this core can now be retired + }; + TCpuIdleHandlerFn iHandler; TAny* iPtr; volatile TBool iPostambleRequired; @@ -814,6 +826,7 @@ IMPORT_C static void ThreadRelease(NThread* aThread, TInt aReturnValue, NFastMutex* aMutex); IMPORT_C static void ThreadSetPriority(NThread* aThread, TInt aPriority); IMPORT_C static void ThreadSetPriority(NThread* aThread, TInt aPriority, NFastMutex* aMutex); + static void ThreadSetNominalPriority(NThread* aThread, TInt aPriority); IMPORT_C static void ThreadRequestSignal(NThread* aThread); IMPORT_C static void ThreadRequestSignal(NThread* aThread, NFastMutex* aMutex); IMPORT_C static void ThreadRequestSignal(NThread* aThread, TInt aCount);