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