kernel/eka/include/nkern/nkern.h
branchRCL_3
changeset 257 3e88ff8f41d5
parent 256 c1f20ce4abcf
equal deleted inserted replaced
256:c1f20ce4abcf 257:3e88ff8f41d5
    34 
    34 
    35 extern "C" {
    35 extern "C" {
    36 /** @internalComponent */
    36 /** @internalComponent */
    37 IMPORT_C void NKFault(const char* file, TInt line);
    37 IMPORT_C void NKFault(const char* file, TInt line);
    38 /** @internalComponent */
    38 /** @internalComponent */
    39 void NKIdle(TUint32 aStage);
    39 void NKIdle(TInt aStage);
    40 }
    40 }
    41 
    41 
    42 /**
    42 /**
    43 @publishedPartner
    43 @publishedPartner
    44 @released
    44 @released
   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	Bits 0-7 give a bitmask of CPUs now active, i.e. 0 means all processors now idle
   718 	@param	aStage	If positive, the number of processors still active
   719 					Bit 31 set indicates that the current core can now be powered down
   719 					If zero, indicates all processors are now idle
   720 					Bit 30 set indicates that other cores still remain to be retired
   720 					-1 indicates that postamble processing is required after waking up
   721 					Bit 29 set indicates that postamble processing is required after waking up
       
   722 
   721 
   723 	@internalComponent
   722 	@internalComponent
   724 */
   723 */
   725 typedef void (*TCpuIdleHandlerFn)(TAny* aPtr, TUint32 aStage);
   724 typedef void (*TCpuIdleHandlerFn)(TAny* aPtr, TInt aStage);
   726 
   725 
   727 /** Idle handler structure
   726 /** Idle handler structure
   728 
   727 
   729 	@internalComponent
   728 	@internalComponent
   730 */
   729 */
   731 struct SCpuIdleHandler
   730 struct SCpuIdleHandler
   732 	{
   731 	{
   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 
       
   744 	TCpuIdleHandlerFn	iHandler;
   732 	TCpuIdleHandlerFn	iHandler;
   745 	TAny*				iPtr;
   733 	TAny*				iPtr;
   746 	volatile TBool		iPostambleRequired;
   734 	volatile TBool		iPostambleRequired;
   747 	};
   735 	};
   748 
   736 
   824 	IMPORT_C static TBool ThreadForceResume(NThread* aThread, NFastMutex* aMutex);
   812 	IMPORT_C static TBool ThreadForceResume(NThread* aThread, NFastMutex* aMutex);
   825 	IMPORT_C static void ThreadRelease(NThread* aThread, TInt aReturnValue);
   813 	IMPORT_C static void ThreadRelease(NThread* aThread, TInt aReturnValue);
   826 	IMPORT_C static void ThreadRelease(NThread* aThread, TInt aReturnValue, NFastMutex* aMutex);
   814 	IMPORT_C static void ThreadRelease(NThread* aThread, TInt aReturnValue, NFastMutex* aMutex);
   827 	IMPORT_C static void ThreadSetPriority(NThread* aThread, TInt aPriority);
   815 	IMPORT_C static void ThreadSetPriority(NThread* aThread, TInt aPriority);
   828 	IMPORT_C static void ThreadSetPriority(NThread* aThread, TInt aPriority, NFastMutex* aMutex);
   816 	IMPORT_C static void ThreadSetPriority(NThread* aThread, TInt aPriority, NFastMutex* aMutex);
   829 	static void ThreadSetNominalPriority(NThread* aThread, TInt aPriority);
       
   830 	IMPORT_C static void ThreadRequestSignal(NThread* aThread);
   817 	IMPORT_C static void ThreadRequestSignal(NThread* aThread);
   831 	IMPORT_C static void ThreadRequestSignal(NThread* aThread, NFastMutex* aMutex);
   818 	IMPORT_C static void ThreadRequestSignal(NThread* aThread, NFastMutex* aMutex);
   832 	IMPORT_C static void ThreadRequestSignal(NThread* aThread, TInt aCount);
   819 	IMPORT_C static void ThreadRequestSignal(NThread* aThread, TInt aCount);
   833 	IMPORT_C static void ThreadKill(NThread* aThread);
   820 	IMPORT_C static void ThreadKill(NThread* aThread);
   834 	IMPORT_C static void ThreadKill(NThread* aThread, NFastMutex* aMutex);
   821 	IMPORT_C static void ThreadKill(NThread* aThread, NFastMutex* aMutex);