1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/kernel/eka/nkern/arm/ncsched.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,113 @@
1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// e32\nkern\arm\ncsched.cpp
1.18 +//
1.19 +//
1.20 +
1.21 +// NThreadBase member data
1.22 +#define __INCLUDE_NTHREADBASE_DEFINES__
1.23 +
1.24 +#include <arm.h>
1.25 +
1.26 +#if defined(_DEBUG)
1.27 +extern "C" void __DebugMsgWaitForAnyRequest()
1.28 + {
1.29 + __KTRACE_OPT(KEXEC,DEBUGPRINT("WfAR"));
1.30 + }
1.31 +
1.32 +extern "C" void __DebugMsgResched(int a)
1.33 + {
1.34 + __KTRACE_OPT(KSCHED,DEBUGPRINT("Reschedule->%T",a));
1.35 + }
1.36 +
1.37 +extern "C" void __DebugMsgInitSelection(int a)
1.38 + {
1.39 + NThread* pT=(NThread*)a;
1.40 + if (pT->iHeldFastMutex)
1.41 + {
1.42 + __KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched init->%T, Holding %M",pT,pT->iHeldFastMutex));
1.43 + }
1.44 + else
1.45 + {
1.46 + __KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched init->%T",pT));
1.47 + }
1.48 + }
1.49 +
1.50 +extern "C" void __DebugMsgRR(int a)
1.51 + {
1.52 + NThread* pT=(NThread*)a;
1.53 + __KTRACE_OPT(KSCHED2,DEBUGPRINT("RoundRobin->%T",pT));
1.54 + }
1.55 +
1.56 +extern "C" void __DebugMsgBlockedFM(int a)
1.57 + {
1.58 + NFastMutex* pM=(NFastMutex*)a;
1.59 + __KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched inter->%T, Blocked on %M",pM->iHoldingThread,pM));
1.60 + }
1.61 +
1.62 +extern "C" void __DebugMsgImpSysHeld(int a)
1.63 + {
1.64 + NThread* pT=(NThread*)a;
1.65 + __KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched inter->%T (IMP SYS)",pT));
1.66 + }
1.67 +
1.68 +extern "C" void __DebugMsgFMSignal(int a)
1.69 + {
1.70 + CHECK_PRECONDITIONS(MASK_KERNEL_LOCKED,"NFastMutex::Signal");
1.71 + __ASSERT_WITH_MESSAGE_DEBUG(TheScheduler.iCurrentThread->iHeldFastMutex==(NFastMutex*)a,"The calling thread doesn't hold the mutex","NFastMutex::Signal");
1.72 + __KTRACE_OPT(KNKERN,DEBUGPRINT("FMSignal %M",a));
1.73 + }
1.74 +
1.75 +extern "C" void __DebugMsgFMWait(int a)
1.76 + {
1.77 + CHECK_PRECONDITIONS(MASK_KERNEL_LOCKED_ONCE,"NFastMutex::Wait()");
1.78 + __ASSERT_WITH_MESSAGE_DEBUG(!TheScheduler.iCurrentThread->iHeldFastMutex,"No fast mutex can be held.","NFastMutex::Wait");
1.79 + __KTRACE_OPT(KNKERN,DEBUGPRINT("FMWait %M",a));
1.80 + }
1.81 +
1.82 +extern "C" void __DebugMsgFMWaitYield(int a)
1.83 + {
1.84 + __KTRACE_OPT(KNKERN,DEBUGPRINT("FMWait: YieldTo %T",a));
1.85 + }
1.86 +
1.87 +extern "C" void __DebugMsgNKFMSignal(int a)
1.88 + {
1.89 + __ASSERT_WITH_MESSAGE_DEBUG(TheScheduler.iCurrentThread->iHeldFastMutex==(NFastMutex*)a,"The calling thread doesn't hold the mutex","NKern::FMSignal");
1.90 + __KTRACE_OPT(KNKERN,DEBUGPRINT("NKFMSignal %M",a));
1.91 + }
1.92 +
1.93 +extern "C" void __DebugMsgNKFMWait(int a)
1.94 + {
1.95 + __ASSERT_WITH_MESSAGE_DEBUG(!TheScheduler.iCurrentThread->iHeldFastMutex,"No fast mutex can be held.","NKern::FMWait");
1.96 + __KTRACE_OPT(KNKERN,DEBUGPRINT("NKFMWait %M",a));
1.97 + }
1.98 +
1.99 +extern "C" void __DebugMsgNKFMWaitYield(int a)
1.100 + {
1.101 + __KTRACE_OPT(KNKERN,DEBUGPRINT("NKFMWait: YieldTo %T",a));
1.102 + }
1.103 +
1.104 +extern "C" void __DebugMsgNKFMFlash(int a)
1.105 + {
1.106 + __ASSERT_WITH_MESSAGE_DEBUG(TheScheduler.iCurrentThread->iHeldFastMutex==(NFastMutex*)a,"The calling thread doesn't hold the mutex","NKern::FMFlash");
1.107 + __KTRACE_OPT(KNKERN,DEBUGPRINT("NKFMFlash %M",a));
1.108 + }
1.109 +#endif
1.110 +
1.111 +#ifdef __FAST_SEM_MACHINE_CODED__
1.112 +extern "C" void PanicFastSemaphoreWait()
1.113 + {
1.114 + FAULT();
1.115 + }
1.116 +#endif