Update contrib.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32test\misc\int_svr_calls.cia
24 #define __GEN_USER_EXEC_CODE__
29 #define EXPORT_C __declspec(dllexport)
33 // ripped from e32\euser\epoc\arm\uc_exec.cia
35 __NAKED__ TInt Exec::SessionSend(TInt /*aHandle*/, TInt /*aFunction*/, TAny* /*aPtr*/, TRequestStatus* /*aStatus*/)
37 // Send a blind message to the server.
40 asm("stmfd sp!, {r4-r8,lr} ");
41 asm("movs r8, r2 "); // test for aPtr==NULL, set iArgFlags=0 if so
42 asm("ldmneia r2, {r4-r8} "); // else get args into r4-r8
44 asm("swi %a0" : : "i" (EExecSessionSend|EXECUTIVE_SLOW));
48 __NAKED__ TInt Exec::SessionSendSync(TInt /*aHandle*/, TInt /*aFunction*/, TAny* /*aPtr*/, TRequestStatus* /*aStatus*/)
50 // Send a blind message to the server using thread's dedicated message slot.
53 asm("stmfd sp!, {r4-r8,lr} ");
54 asm("movs r8, r2 "); // test for aPtr==NULL, set iArgFlags=0 if so
55 asm("ldmneia r2, {r4-r8} "); // else get args into r4-r8
57 asm("swi %a0" : : "i" (EExecSessionSendSync|EXECUTIVE_SLOW));
61 EXPORT_C TInt SessionCreate(const TDesC8& aName, TInt aMsgSlots, const TSecurityPolicy* aPolicy, TInt aType)
63 return Exec::SessionCreate(aName, aMsgSlots, aPolicy, aType);
66 EXPORT_C TInt SessionSend(TInt aHandle, TInt aFunction, TAny* aArgs, TRequestStatus* aStatus)
68 return Exec::SessionSend(aHandle, aFunction, aArgs, aStatus);
71 EXPORT_C TInt SessionSendSync(TInt aHandle, TInt aFunction, TAny* aArgs, TRequestStatus* aStatus)
73 return Exec::SessionSendSync(aHandle, aFunction, aArgs, aStatus);
76 EXPORT_C void SetSessionPtr(TInt aHandle, const TAny* aPtr)
78 Exec::SetSessionPtr(aHandle, aPtr);
83 // ripped from e32\euser\epoc\x86\uc_exec.cpp
85 __NAKED__ TInt Exec::SessionSend(TInt /*aHandle*/, TInt /*aFunction*/, TAny* /*aPtr*/, TRequestStatus* /*aStatus*/)
87 // Send a blind message to the server.
90 SLOW_EXEC4(EExecSessionSend);
93 __NAKED__ TInt Exec::SessionSendSync(TInt /*aHandle*/, TInt /*aFunction*/, TAny* /*aPtr*/, TRequestStatus* /*aStatus*/)
95 // Send a blind message to the server using thread's dedicated message slot.
98 SLOW_EXEC4(EExecSessionSendSync);
101 EXPORT_C TInt SessionCreate(const TDesC8& aName, TInt aMsgSlots, const TSecurityPolicy* aPolicy, TInt aType)
103 RDebug::Printf("Exec: %08x %08x %08x %08x", &aName, aMsgSlots, aPolicy, aType);
104 return Exec::SessionCreate(aName, aMsgSlots, aPolicy, aType);
107 EXPORT_C TInt SessionSend(TInt aHandle, TInt aFunction, TAny* aArgs, TRequestStatus* aStatus)
109 return Exec::SessionSend(aHandle, aFunction, aArgs, aStatus);
112 EXPORT_C TInt SessionSendSync(TInt aHandle, TInt aFunction, TAny* aArgs, TRequestStatus* aStatus)
114 return Exec::SessionSendSync(aHandle, aFunction, aArgs, aStatus);
117 EXPORT_C void SetSessionPtr(TInt aHandle, const TAny* aPtr)
119 Exec::SetSessionPtr(aHandle, aPtr);