|
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 // |
|
15 |
|
16 #include "arm_mem.h" |
|
17 |
|
18 #define iMState iWaitLink.iSpare1 |
|
19 |
|
20 #ifdef __REQUEST_COMPLETE_MACHINE_CODED__ |
|
21 |
|
22 void DoRequestComplete(DThread* aThread, TRequestStatus* aStatus, TInt aReason); |
|
23 |
|
24 void DThread::RequestComplete(TRequestStatus*& aStatus, TInt aReason) |
|
25 // |
|
26 // Signal this threads request semaphore. |
|
27 // Enter with system locked, return with system unlocked. |
|
28 // |
|
29 { |
|
30 DThread* thread = TheCurrentThread; |
|
31 TRequestStatus* status = aStatus; |
|
32 aStatus = NULL; |
|
33 TInt pagingFault; |
|
34 do |
|
35 { |
|
36 XTRAP_PAGING_START(pagingFault); |
|
37 CHECK_PAGING_SAFE; |
|
38 thread->iIpcClient = this; |
|
39 DoRequestComplete(this, status,aReason); |
|
40 thread->iIpcClient = NULL; |
|
41 XTRAP_PAGING_END; |
|
42 } |
|
43 while (pagingFault > 0); // ignore errors |
|
44 } |
|
45 |
|
46 #if defined(_DEBUG) |
|
47 extern "C" void __DebugMsgRequestComplete(TInt a0, TInt a1, TInt a2) |
|
48 { |
|
49 DThread* pT=(DThread*)a0; |
|
50 __KTRACE_OPT(KTHREAD,Kern::Printf("Thread %O RequestComplete %08x %d",pT,a1,a2)); |
|
51 } |
|
52 |
|
53 extern "C" void __DebugMsgReqCompleteWrite(TInt a0, TInt a1, TInt a2) |
|
54 { |
|
55 __KTRACE_OPT(KTHREAD,Kern::Printf("Writing %d to %08x",a2,a0+a1)); |
|
56 } |
|
57 #endif |
|
58 #endif |
|
59 |