|
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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // e32\nkern\x86\ncsched.cpp |
|
15 // |
|
16 // |
|
17 |
|
18 // NThreadBase member data |
|
19 #define __INCLUDE_NTHREADBASE_DEFINES__ |
|
20 |
|
21 #include <x86.h> |
|
22 |
|
23 //#define __DEBUG_BAD_ADDR |
|
24 |
|
25 #if defined(KSCHED) |
|
26 extern "C" void __DebugMsgWaitForAnyRequest() |
|
27 { |
|
28 __KTRACE_OPT(KEXEC,DEBUGPRINT("WfAR")); |
|
29 } |
|
30 |
|
31 extern "C" void __DebugMsgResched(int a) |
|
32 { |
|
33 __KTRACE_OPT(KSCHED,DEBUGPRINT("Reschedule->%T",a)); |
|
34 } |
|
35 |
|
36 extern "C" void __DebugMsgInitSelection(int a) |
|
37 { |
|
38 NThread* pT=(NThread*)a; |
|
39 if (pT->iHeldFastMutex) |
|
40 { |
|
41 __KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched init->%T, Holding %M",pT,pT->iHeldFastMutex)); |
|
42 } |
|
43 else |
|
44 { |
|
45 __KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched init->%T",pT)); |
|
46 } |
|
47 } |
|
48 |
|
49 extern "C" void __DebugMsgRR(int a) |
|
50 { |
|
51 NThread* pT=(NThread*)a; |
|
52 __KTRACE_OPT(KSCHED2,DEBUGPRINT("RoundRobin->%T",pT)); |
|
53 } |
|
54 |
|
55 extern "C" void __DebugMsgBlockedFM(int a) |
|
56 { |
|
57 NFastMutex* pM=(NFastMutex*)a; |
|
58 __KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched inter->%T, Blocked on %M",pM->iHoldingThread,pM)); |
|
59 } |
|
60 |
|
61 extern "C" void __DebugMsgImpSysHeld(int a) |
|
62 { |
|
63 NThread* pT=(NThread*)a; |
|
64 __KTRACE_OPT(KSCHED2,DEBUGPRINT("Resched inter->%T (IMP SYS)",pT)); |
|
65 } |
|
66 |
|
67 extern "C" void DebugMsgFMSignal(int a) |
|
68 { |
|
69 __NK_ASSERT_DEBUG(TheScheduler.iCurrentThread->iHeldFastMutex==(NFastMutex*)a); |
|
70 __KTRACE_OPT(KNKERN,DEBUGPRINT("FMSignal %M",a)); |
|
71 } |
|
72 |
|
73 extern "C" void DebugMsgFMWait(int a) |
|
74 { |
|
75 __NK_ASSERT_DEBUG(!TheScheduler.iCurrentThread->iHeldFastMutex); |
|
76 __KTRACE_OPT(KNKERN,DEBUGPRINT("FMWait %M",a)); |
|
77 } |
|
78 |
|
79 extern "C" void DebugMsgFMWaitYield(int a) |
|
80 { |
|
81 __KTRACE_OPT(KNKERN,DEBUGPRINT("FMWait: YieldTo %T",a)); |
|
82 } |
|
83 |
|
84 extern "C" void DebugMsgNKFMSignal(int a) |
|
85 { |
|
86 __NK_ASSERT_DEBUG(TheScheduler.iCurrentThread->iHeldFastMutex==(NFastMutex*)a); |
|
87 __KTRACE_OPT(KNKERN,DEBUGPRINT("NKFMSignal %M",a)); |
|
88 } |
|
89 |
|
90 extern "C" void DebugMsgNKFMWait(int a) |
|
91 { |
|
92 __NK_ASSERT_DEBUG(!TheScheduler.iCurrentThread->iHeldFastMutex); |
|
93 __KTRACE_OPT(KNKERN,DEBUGPRINT("NKFMWait %M",a)); |
|
94 } |
|
95 |
|
96 extern "C" void DebugMsgNKFMWaitYield(int a) |
|
97 { |
|
98 __KTRACE_OPT(KNKERN,DEBUGPRINT("NKFMWait: YieldTo %T",a)); |
|
99 } |
|
100 |
|
101 #endif |
|
102 |