713 |
713 |
714 /** Idle handler function |
714 /** Idle handler function |
715 Pointer to a function which is called whenever a CPU goes idle |
715 Pointer to a function which is called whenever a CPU goes idle |
716 |
716 |
717 @param aPtr The iPtr stored in the SCpuIdleHandler structure |
717 @param aPtr The iPtr stored in the SCpuIdleHandler structure |
718 @param aStage If positive, the number of processors still active |
718 @param aStage Bits 0-7 give a bitmask of CPUs now active, i.e. 0 means all processors now idle |
719 If zero, indicates all processors are now idle |
719 Bit 31 set indicates that the current core can now be powered down |
720 -1 indicates that postamble processing is required after waking up |
720 Bit 30 set indicates that other cores still remain to be retired |
|
721 Bit 29 set indicates that postamble processing is required after waking up |
721 |
722 |
722 @internalComponent |
723 @internalComponent |
723 */ |
724 */ |
724 typedef void (*TCpuIdleHandlerFn)(TAny* aPtr, TInt aStage); |
725 typedef void (*TCpuIdleHandlerFn)(TAny* aPtr, TUint32 aStage); |
725 |
726 |
726 /** Idle handler structure |
727 /** Idle handler structure |
727 |
728 |
728 @internalComponent |
729 @internalComponent |
729 */ |
730 */ |
730 struct SCpuIdleHandler |
731 struct SCpuIdleHandler |
731 { |
732 { |
|
733 /** |
|
734 Defined flag bits in aStage parameter |
|
735 */ |
|
736 enum |
|
737 { |
|
738 EActiveCpuMask=0xFFu, |
|
739 EPostamble=1u<<29, // postamble needed |
|
740 EMore=1u<<30, // more cores still to be retired |
|
741 ERetire=1u<<31, // this core can now be retired |
|
742 }; |
|
743 |
732 TCpuIdleHandlerFn iHandler; |
744 TCpuIdleHandlerFn iHandler; |
733 TAny* iPtr; |
745 TAny* iPtr; |
734 volatile TBool iPostambleRequired; |
746 volatile TBool iPostambleRequired; |
735 }; |
747 }; |
736 |
748 |
812 IMPORT_C static TBool ThreadForceResume(NThread* aThread, NFastMutex* aMutex); |
824 IMPORT_C static TBool ThreadForceResume(NThread* aThread, NFastMutex* aMutex); |
813 IMPORT_C static void ThreadRelease(NThread* aThread, TInt aReturnValue); |
825 IMPORT_C static void ThreadRelease(NThread* aThread, TInt aReturnValue); |
814 IMPORT_C static void ThreadRelease(NThread* aThread, TInt aReturnValue, NFastMutex* aMutex); |
826 IMPORT_C static void ThreadRelease(NThread* aThread, TInt aReturnValue, NFastMutex* aMutex); |
815 IMPORT_C static void ThreadSetPriority(NThread* aThread, TInt aPriority); |
827 IMPORT_C static void ThreadSetPriority(NThread* aThread, TInt aPriority); |
816 IMPORT_C static void ThreadSetPriority(NThread* aThread, TInt aPriority, NFastMutex* aMutex); |
828 IMPORT_C static void ThreadSetPriority(NThread* aThread, TInt aPriority, NFastMutex* aMutex); |
|
829 static void ThreadSetNominalPriority(NThread* aThread, TInt aPriority); |
817 IMPORT_C static void ThreadRequestSignal(NThread* aThread); |
830 IMPORT_C static void ThreadRequestSignal(NThread* aThread); |
818 IMPORT_C static void ThreadRequestSignal(NThread* aThread, NFastMutex* aMutex); |
831 IMPORT_C static void ThreadRequestSignal(NThread* aThread, NFastMutex* aMutex); |
819 IMPORT_C static void ThreadRequestSignal(NThread* aThread, TInt aCount); |
832 IMPORT_C static void ThreadRequestSignal(NThread* aThread, TInt aCount); |
820 IMPORT_C static void ThreadKill(NThread* aThread); |
833 IMPORT_C static void ThreadKill(NThread* aThread); |
821 IMPORT_C static void ThreadKill(NThread* aThread, NFastMutex* aMutex); |
834 IMPORT_C static void ThreadKill(NThread* aThread, NFastMutex* aMutex); |