|
1 // Copyright (c) 2005-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 // e32test\misc\int_svr_calls.cia |
|
15 // |
|
16 // |
|
17 |
|
18 #include <e32def.h> |
|
19 #undef EXPORT_C |
|
20 #define EXPORT_C |
|
21 |
|
22 #define __GEN_USER_EXEC_CODE__ |
|
23 #include <e32svr.h> |
|
24 #include <u32exec.h> |
|
25 |
|
26 #undef EXPORT_C |
|
27 #define EXPORT_C __declspec(dllexport) |
|
28 |
|
29 // ripped from e32\euser\epoc\arm\uc_exec.cia |
|
30 |
|
31 __NAKED__ TInt Exec::SessionSend(TInt /*aHandle*/, TInt /*aFunction*/, TAny* /*aPtr*/, TRequestStatus* /*aStatus*/) |
|
32 // |
|
33 // Send a blind message to the server. |
|
34 // |
|
35 { |
|
36 asm("stmfd sp!, {r4-r8,lr} "); |
|
37 asm("movs r8, r2 "); // test for aPtr==NULL, set iArgFlags=0 if so |
|
38 asm("ldmneia r2, {r4-r8} "); // else get args into r4-r8 |
|
39 asm("mov ip, pc "); |
|
40 asm("swi %a0" : : "i" (EExecSessionSend|EXECUTIVE_SLOW)); |
|
41 __POPRET("r4-r8,"); |
|
42 } |
|
43 |
|
44 __NAKED__ TInt Exec::SessionSendSync(TInt /*aHandle*/, TInt /*aFunction*/, TAny* /*aPtr*/, TRequestStatus* /*aStatus*/) |
|
45 // |
|
46 // Send a blind message to the server using thread's dedicated message slot. |
|
47 // |
|
48 { |
|
49 asm("stmfd sp!, {r4-r8,lr} "); |
|
50 asm("movs r8, r2 "); // test for aPtr==NULL, set iArgFlags=0 if so |
|
51 asm("ldmneia r2, {r4-r8} "); // else get args into r4-r8 |
|
52 asm("mov ip, pc "); |
|
53 asm("swi %a0" : : "i" (EExecSessionSendSync|EXECUTIVE_SLOW)); |
|
54 __POPRET("r4-r8,"); |
|
55 } |
|
56 |
|
57 EXPORT_C TInt SessionCreate(const TDesC8& aName, TInt aMsgSlots, const TSecurityPolicy* aPolicy, TInt aType) |
|
58 { |
|
59 return Exec::SessionCreate(aName, aMsgSlots, aPolicy, aType); |
|
60 } |
|
61 |
|
62 EXPORT_C TInt SessionSend(TInt aHandle, TInt aFunction, TAny* aArgs, TRequestStatus* aStatus) |
|
63 { |
|
64 return Exec::SessionSend(aHandle, aFunction, aArgs, aStatus); |
|
65 } |
|
66 |
|
67 EXPORT_C TInt SessionSendSync(TInt aHandle, TInt aFunction, TAny* aArgs, TRequestStatus* aStatus) |
|
68 { |
|
69 return Exec::SessionSendSync(aHandle, aFunction, aArgs, aStatus); |
|
70 } |
|
71 |
|
72 EXPORT_C void SetSessionPtr(TInt aHandle, const TAny* aPtr) |
|
73 { |
|
74 Exec::SetSessionPtr(aHandle, aPtr); |
|
75 } |