sl@0: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32\nkern\x86\ncsched.cpp sl@0: // sl@0: // sl@0: sl@0: // NThreadBase member data sl@0: #define __INCLUDE_NTHREADBASE_DEFINES__ sl@0: sl@0: #include sl@0: sl@0: //#define __DEBUG_BAD_ADDR sl@0: sl@0: #if defined(KSCHED) sl@0: extern "C" void __DebugMsgWaitForAnyRequest() sl@0: { sl@0: __KTRACE_OPT(KEXEC,DEBUGPRINT("WfAR")); sl@0: } sl@0: sl@0: extern "C" void __DebugMsgResched(int a) sl@0: { sl@0: __KTRACE_OPT(KSCHED,DEBUGPRINT("Reschedule->%T",a)); sl@0: } sl@0: sl@0: extern "C" void __DebugMsgInitSelection(int a) sl@0: { sl@0: NThread* pT=(NThread*)a; sl@0: if (pT->iHeldFastMutex) sl@0: { sl@0: __KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched init->%T, Holding %M",pT,pT->iHeldFastMutex)); sl@0: } sl@0: else sl@0: { sl@0: __KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched init->%T",pT)); sl@0: } sl@0: } sl@0: sl@0: extern "C" void __DebugMsgRR(int a) sl@0: { sl@0: NThread* pT=(NThread*)a; sl@0: __KTRACE_OPT(KSCHED2,DEBUGPRINT("RoundRobin->%T",pT)); sl@0: } sl@0: sl@0: extern "C" void __DebugMsgBlockedFM(int a) sl@0: { sl@0: NFastMutex* pM=(NFastMutex*)a; sl@0: __KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched inter->%T, Blocked on %M",pM->iHoldingThread,pM)); sl@0: } sl@0: sl@0: extern "C" void __DebugMsgImpSysHeld(int a) sl@0: { sl@0: NThread* pT=(NThread*)a; sl@0: __KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched inter->%T (IMP SYS)",pT)); sl@0: } sl@0: sl@0: extern "C" void DebugMsgFMSignal(int a) sl@0: { sl@0: __NK_ASSERT_DEBUG(TheScheduler.iCurrentThread->iHeldFastMutex==(NFastMutex*)a); sl@0: __KTRACE_OPT(KNKERN,DEBUGPRINT("FMSignal %M",a)); sl@0: } sl@0: sl@0: extern "C" void DebugMsgFMWait(int a) sl@0: { sl@0: __NK_ASSERT_DEBUG(!TheScheduler.iCurrentThread->iHeldFastMutex); sl@0: __KTRACE_OPT(KNKERN,DEBUGPRINT("FMWait %M",a)); sl@0: } sl@0: sl@0: extern "C" void DebugMsgFMWaitYield(int a) sl@0: { sl@0: __KTRACE_OPT(KNKERN,DEBUGPRINT("FMWait: YieldTo %T",a)); sl@0: } sl@0: sl@0: extern "C" void DebugMsgNKFMSignal(int a) sl@0: { sl@0: __NK_ASSERT_DEBUG(TheScheduler.iCurrentThread->iHeldFastMutex==(NFastMutex*)a); sl@0: __KTRACE_OPT(KNKERN,DEBUGPRINT("NKFMSignal %M",a)); sl@0: } sl@0: sl@0: extern "C" void DebugMsgNKFMWait(int a) sl@0: { sl@0: __NK_ASSERT_DEBUG(!TheScheduler.iCurrentThread->iHeldFastMutex); sl@0: __KTRACE_OPT(KNKERN,DEBUGPRINT("NKFMWait %M",a)); sl@0: } sl@0: sl@0: extern "C" void DebugMsgNKFMWaitYield(int a) sl@0: { sl@0: __KTRACE_OPT(KNKERN,DEBUGPRINT("NKFMWait: YieldTo %T",a)); sl@0: } sl@0: sl@0: #endif sl@0: