Update contrib.
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32\nkern\arm\ncsched.cpp
18 // NThreadBase member data
19 #define __INCLUDE_NTHREADBASE_DEFINES__
24 extern "C" void __DebugMsgWaitForAnyRequest()
26 __KTRACE_OPT(KEXEC,DEBUGPRINT("WfAR"));
29 extern "C" void __DebugMsgResched(int a)
31 __KTRACE_OPT(KSCHED,DEBUGPRINT("Reschedule->%T",a));
34 extern "C" void __DebugMsgInitSelection(int a)
36 NThread* pT=(NThread*)a;
37 if (pT->iHeldFastMutex)
39 __KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched init->%T, Holding %M",pT,pT->iHeldFastMutex));
43 __KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched init->%T",pT));
47 extern "C" void __DebugMsgRR(int a)
49 NThread* pT=(NThread*)a;
50 __KTRACE_OPT(KSCHED2,DEBUGPRINT("RoundRobin->%T",pT));
53 extern "C" void __DebugMsgBlockedFM(int a)
55 NFastMutex* pM=(NFastMutex*)a;
56 __KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched inter->%T, Blocked on %M",pM->iHoldingThread,pM));
59 extern "C" void __DebugMsgImpSysHeld(int a)
61 NThread* pT=(NThread*)a;
62 __KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched inter->%T (IMP SYS)",pT));
65 extern "C" void __DebugMsgFMSignal(int a)
67 CHECK_PRECONDITIONS(MASK_KERNEL_LOCKED,"NFastMutex::Signal");
68 __ASSERT_WITH_MESSAGE_DEBUG(TheScheduler.iCurrentThread->iHeldFastMutex==(NFastMutex*)a,"The calling thread doesn't hold the mutex","NFastMutex::Signal");
69 __KTRACE_OPT(KNKERN,DEBUGPRINT("FMSignal %M",a));
72 extern "C" void __DebugMsgFMWait(int a)
74 CHECK_PRECONDITIONS(MASK_KERNEL_LOCKED_ONCE,"NFastMutex::Wait()");
75 __ASSERT_WITH_MESSAGE_DEBUG(!TheScheduler.iCurrentThread->iHeldFastMutex,"No fast mutex can be held.","NFastMutex::Wait");
76 __KTRACE_OPT(KNKERN,DEBUGPRINT("FMWait %M",a));
79 extern "C" void __DebugMsgFMWaitYield(int a)
81 __KTRACE_OPT(KNKERN,DEBUGPRINT("FMWait: YieldTo %T",a));
84 extern "C" void __DebugMsgNKFMSignal(int a)
86 __ASSERT_WITH_MESSAGE_DEBUG(TheScheduler.iCurrentThread->iHeldFastMutex==(NFastMutex*)a,"The calling thread doesn't hold the mutex","NKern::FMSignal");
87 __KTRACE_OPT(KNKERN,DEBUGPRINT("NKFMSignal %M",a));
90 extern "C" void __DebugMsgNKFMWait(int a)
92 __ASSERT_WITH_MESSAGE_DEBUG(!TheScheduler.iCurrentThread->iHeldFastMutex,"No fast mutex can be held.","NKern::FMWait");
93 __KTRACE_OPT(KNKERN,DEBUGPRINT("NKFMWait %M",a));
96 extern "C" void __DebugMsgNKFMWaitYield(int a)
98 __KTRACE_OPT(KNKERN,DEBUGPRINT("NKFMWait: YieldTo %T",a));
101 extern "C" void __DebugMsgNKFMFlash(int a)
103 __ASSERT_WITH_MESSAGE_DEBUG(TheScheduler.iCurrentThread->iHeldFastMutex==(NFastMutex*)a,"The calling thread doesn't hold the mutex","NKern::FMFlash");
104 __KTRACE_OPT(KNKERN,DEBUGPRINT("NKFMFlash %M",a));
108 #ifdef __FAST_SEM_MACHINE_CODED__
109 extern "C" void PanicFastSemaphoreWait()