sl@0
|
1 |
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// e32\nkern\x86\ncsched.cpp
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
// NThreadBase member data
|
sl@0
|
19 |
#define __INCLUDE_NTHREADBASE_DEFINES__
|
sl@0
|
20 |
|
sl@0
|
21 |
#include <x86.h>
|
sl@0
|
22 |
|
sl@0
|
23 |
//#define __DEBUG_BAD_ADDR
|
sl@0
|
24 |
|
sl@0
|
25 |
#if defined(KSCHED)
|
sl@0
|
26 |
extern "C" void __DebugMsgWaitForAnyRequest()
|
sl@0
|
27 |
{
|
sl@0
|
28 |
__KTRACE_OPT(KEXEC,DEBUGPRINT("WfAR"));
|
sl@0
|
29 |
}
|
sl@0
|
30 |
|
sl@0
|
31 |
extern "C" void __DebugMsgResched(int a)
|
sl@0
|
32 |
{
|
sl@0
|
33 |
__KTRACE_OPT(KSCHED,DEBUGPRINT("Reschedule->%T",a));
|
sl@0
|
34 |
}
|
sl@0
|
35 |
|
sl@0
|
36 |
extern "C" void __DebugMsgInitSelection(int a)
|
sl@0
|
37 |
{
|
sl@0
|
38 |
NThread* pT=(NThread*)a;
|
sl@0
|
39 |
if (pT->iHeldFastMutex)
|
sl@0
|
40 |
{
|
sl@0
|
41 |
__KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched init->%T, Holding %M",pT,pT->iHeldFastMutex));
|
sl@0
|
42 |
}
|
sl@0
|
43 |
else
|
sl@0
|
44 |
{
|
sl@0
|
45 |
__KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched init->%T",pT));
|
sl@0
|
46 |
}
|
sl@0
|
47 |
}
|
sl@0
|
48 |
|
sl@0
|
49 |
extern "C" void __DebugMsgRR(int a)
|
sl@0
|
50 |
{
|
sl@0
|
51 |
NThread* pT=(NThread*)a;
|
sl@0
|
52 |
__KTRACE_OPT(KSCHED2,DEBUGPRINT("RoundRobin->%T",pT));
|
sl@0
|
53 |
}
|
sl@0
|
54 |
|
sl@0
|
55 |
extern "C" void __DebugMsgBlockedFM(int a)
|
sl@0
|
56 |
{
|
sl@0
|
57 |
NFastMutex* pM=(NFastMutex*)a;
|
sl@0
|
58 |
__KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched inter->%T, Blocked on %M",pM->iHoldingThread,pM));
|
sl@0
|
59 |
}
|
sl@0
|
60 |
|
sl@0
|
61 |
extern "C" void __DebugMsgImpSysHeld(int a)
|
sl@0
|
62 |
{
|
sl@0
|
63 |
NThread* pT=(NThread*)a;
|
sl@0
|
64 |
__KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched inter->%T (IMP SYS)",pT));
|
sl@0
|
65 |
}
|
sl@0
|
66 |
|
sl@0
|
67 |
extern "C" void DebugMsgFMSignal(int a)
|
sl@0
|
68 |
{
|
sl@0
|
69 |
__NK_ASSERT_DEBUG(TheScheduler.iCurrentThread->iHeldFastMutex==(NFastMutex*)a);
|
sl@0
|
70 |
__KTRACE_OPT(KNKERN,DEBUGPRINT("FMSignal %M",a));
|
sl@0
|
71 |
}
|
sl@0
|
72 |
|
sl@0
|
73 |
extern "C" void DebugMsgFMWait(int a)
|
sl@0
|
74 |
{
|
sl@0
|
75 |
__NK_ASSERT_DEBUG(!TheScheduler.iCurrentThread->iHeldFastMutex);
|
sl@0
|
76 |
__KTRACE_OPT(KNKERN,DEBUGPRINT("FMWait %M",a));
|
sl@0
|
77 |
}
|
sl@0
|
78 |
|
sl@0
|
79 |
extern "C" void DebugMsgFMWaitYield(int a)
|
sl@0
|
80 |
{
|
sl@0
|
81 |
__KTRACE_OPT(KNKERN,DEBUGPRINT("FMWait: YieldTo %T",a));
|
sl@0
|
82 |
}
|
sl@0
|
83 |
|
sl@0
|
84 |
extern "C" void DebugMsgNKFMSignal(int a)
|
sl@0
|
85 |
{
|
sl@0
|
86 |
__NK_ASSERT_DEBUG(TheScheduler.iCurrentThread->iHeldFastMutex==(NFastMutex*)a);
|
sl@0
|
87 |
__KTRACE_OPT(KNKERN,DEBUGPRINT("NKFMSignal %M",a));
|
sl@0
|
88 |
}
|
sl@0
|
89 |
|
sl@0
|
90 |
extern "C" void DebugMsgNKFMWait(int a)
|
sl@0
|
91 |
{
|
sl@0
|
92 |
__NK_ASSERT_DEBUG(!TheScheduler.iCurrentThread->iHeldFastMutex);
|
sl@0
|
93 |
__KTRACE_OPT(KNKERN,DEBUGPRINT("NKFMWait %M",a));
|
sl@0
|
94 |
}
|
sl@0
|
95 |
|
sl@0
|
96 |
extern "C" void DebugMsgNKFMWaitYield(int a)
|
sl@0
|
97 |
{
|
sl@0
|
98 |
__KTRACE_OPT(KNKERN,DEBUGPRINT("NKFMWait: YieldTo %T",a));
|
sl@0
|
99 |
}
|
sl@0
|
100 |
|
sl@0
|
101 |
#endif
|
sl@0
|
102 |
|