os/kernelhwsrv/kernel/eka/nkern/x86/ncsched.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kernel/eka/nkern/x86/ncsched.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,102 @@
     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\x86\ncsched.cpp
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +// NThreadBase member data
    1.22 +#define __INCLUDE_NTHREADBASE_DEFINES__
    1.23 +
    1.24 +#include <x86.h>
    1.25 +
    1.26 +//#define __DEBUG_BAD_ADDR
    1.27 +
    1.28 +#if defined(KSCHED)
    1.29 +extern "C" void __DebugMsgWaitForAnyRequest()
    1.30 +	{
    1.31 +	__KTRACE_OPT(KEXEC,DEBUGPRINT("WfAR"));
    1.32 +	}
    1.33 +
    1.34 +extern "C" void __DebugMsgResched(int a)
    1.35 +	{
    1.36 +	__KTRACE_OPT(KSCHED,DEBUGPRINT("Reschedule->%T",a));
    1.37 +	}
    1.38 +
    1.39 +extern "C" void __DebugMsgInitSelection(int a)
    1.40 +	{
    1.41 +	NThread* pT=(NThread*)a;
    1.42 +	if (pT->iHeldFastMutex)
    1.43 +		{
    1.44 +		__KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched init->%T, Holding %M",pT,pT->iHeldFastMutex));
    1.45 +		}
    1.46 +	else
    1.47 +		{
    1.48 +		__KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched init->%T",pT));
    1.49 +		}
    1.50 +	}
    1.51 +
    1.52 +extern "C" void __DebugMsgRR(int a)
    1.53 +	{
    1.54 +	NThread* pT=(NThread*)a;
    1.55 +	__KTRACE_OPT(KSCHED2,DEBUGPRINT("RoundRobin->%T",pT));
    1.56 +	}
    1.57 +
    1.58 +extern "C" void __DebugMsgBlockedFM(int a)
    1.59 +	{
    1.60 +	NFastMutex* pM=(NFastMutex*)a;
    1.61 +	__KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched inter->%T, Blocked on %M",pM->iHoldingThread,pM));
    1.62 +	}
    1.63 +
    1.64 +extern "C" void __DebugMsgImpSysHeld(int a)
    1.65 +	{
    1.66 +	NThread* pT=(NThread*)a;
    1.67 +	__KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched inter->%T (IMP SYS)",pT));
    1.68 +	}
    1.69 +
    1.70 +extern "C" void DebugMsgFMSignal(int a)
    1.71 +	{
    1.72 +	__NK_ASSERT_DEBUG(TheScheduler.iCurrentThread->iHeldFastMutex==(NFastMutex*)a);
    1.73 +	__KTRACE_OPT(KNKERN,DEBUGPRINT("FMSignal %M",a));
    1.74 +	}
    1.75 +
    1.76 +extern "C" void DebugMsgFMWait(int a)
    1.77 +	{
    1.78 +	__NK_ASSERT_DEBUG(!TheScheduler.iCurrentThread->iHeldFastMutex);
    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 +	__NK_ASSERT_DEBUG(TheScheduler.iCurrentThread->iHeldFastMutex==(NFastMutex*)a);
    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 +	__NK_ASSERT_DEBUG(!TheScheduler.iCurrentThread->iHeldFastMutex);
    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 +#endif
   1.105 +