sl@0: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32test\misc\int_svr_calls.cia sl@0: // sl@0: // sl@0: sl@0: #include sl@0: #undef IMPORT_C sl@0: #define IMPORT_C sl@0: #undef EXPORT_C sl@0: #define EXPORT_C sl@0: sl@0: #define __GEN_USER_EXEC_CODE__ sl@0: #include sl@0: #include sl@0: sl@0: #undef EXPORT_C sl@0: #define EXPORT_C __declspec(dllexport) sl@0: sl@0: sl@0: #ifdef __MARM__ sl@0: // ripped from e32\euser\epoc\arm\uc_exec.cia sl@0: sl@0: __NAKED__ TInt Exec::SessionSend(TInt /*aHandle*/, TInt /*aFunction*/, TAny* /*aPtr*/, TRequestStatus* /*aStatus*/) sl@0: // sl@0: // Send a blind message to the server. sl@0: // sl@0: { sl@0: asm("stmfd sp!, {r4-r8,lr} "); sl@0: asm("movs r8, r2 "); // test for aPtr==NULL, set iArgFlags=0 if so sl@0: asm("ldmneia r2, {r4-r8} "); // else get args into r4-r8 sl@0: asm("mov ip, pc "); sl@0: asm("swi %a0" : : "i" (EExecSessionSend|EXECUTIVE_SLOW)); sl@0: __POPRET("r4-r8,"); sl@0: } sl@0: sl@0: __NAKED__ TInt Exec::SessionSendSync(TInt /*aHandle*/, TInt /*aFunction*/, TAny* /*aPtr*/, TRequestStatus* /*aStatus*/) sl@0: // sl@0: // Send a blind message to the server using thread's dedicated message slot. sl@0: // sl@0: { sl@0: asm("stmfd sp!, {r4-r8,lr} "); sl@0: asm("movs r8, r2 "); // test for aPtr==NULL, set iArgFlags=0 if so sl@0: asm("ldmneia r2, {r4-r8} "); // else get args into r4-r8 sl@0: asm("mov ip, pc "); sl@0: asm("swi %a0" : : "i" (EExecSessionSendSync|EXECUTIVE_SLOW)); sl@0: __POPRET("r4-r8,"); sl@0: } sl@0: sl@0: EXPORT_C TInt SessionCreate(const TDesC8& aName, TInt aMsgSlots, const TSecurityPolicy* aPolicy, TInt aType) sl@0: { sl@0: return Exec::SessionCreate(aName, aMsgSlots, aPolicy, aType); sl@0: } sl@0: sl@0: EXPORT_C TInt SessionSend(TInt aHandle, TInt aFunction, TAny* aArgs, TRequestStatus* aStatus) sl@0: { sl@0: return Exec::SessionSend(aHandle, aFunction, aArgs, aStatus); sl@0: } sl@0: sl@0: EXPORT_C TInt SessionSendSync(TInt aHandle, TInt aFunction, TAny* aArgs, TRequestStatus* aStatus) sl@0: { sl@0: return Exec::SessionSendSync(aHandle, aFunction, aArgs, aStatus); sl@0: } sl@0: sl@0: EXPORT_C void SetSessionPtr(TInt aHandle, const TAny* aPtr) sl@0: { sl@0: Exec::SetSessionPtr(aHandle, aPtr); sl@0: } sl@0: #endif //__MARM__ sl@0: sl@0: #ifdef __X86__ sl@0: // ripped from e32\euser\epoc\x86\uc_exec.cpp sl@0: sl@0: __NAKED__ TInt Exec::SessionSend(TInt /*aHandle*/, TInt /*aFunction*/, TAny* /*aPtr*/, TRequestStatus* /*aStatus*/) sl@0: // sl@0: // Send a blind message to the server. sl@0: // sl@0: { sl@0: SLOW_EXEC4(EExecSessionSend); sl@0: } sl@0: sl@0: __NAKED__ TInt Exec::SessionSendSync(TInt /*aHandle*/, TInt /*aFunction*/, TAny* /*aPtr*/, TRequestStatus* /*aStatus*/) sl@0: // sl@0: // Send a blind message to the server using thread's dedicated message slot. sl@0: // sl@0: { sl@0: SLOW_EXEC4(EExecSessionSendSync); sl@0: } sl@0: sl@0: EXPORT_C TInt SessionCreate(const TDesC8& aName, TInt aMsgSlots, const TSecurityPolicy* aPolicy, TInt aType) sl@0: { sl@0: RDebug::Printf("Exec: %08x %08x %08x %08x", &aName, aMsgSlots, aPolicy, aType); sl@0: return Exec::SessionCreate(aName, aMsgSlots, aPolicy, aType); sl@0: } sl@0: sl@0: EXPORT_C TInt SessionSend(TInt aHandle, TInt aFunction, TAny* aArgs, TRequestStatus* aStatus) sl@0: { sl@0: return Exec::SessionSend(aHandle, aFunction, aArgs, aStatus); sl@0: } sl@0: sl@0: EXPORT_C TInt SessionSendSync(TInt aHandle, TInt aFunction, TAny* aArgs, TRequestStatus* aStatus) sl@0: { sl@0: return Exec::SessionSendSync(aHandle, aFunction, aArgs, aStatus); sl@0: } sl@0: sl@0: EXPORT_C void SetSessionPtr(TInt aHandle, const TAny* aPtr) sl@0: { sl@0: Exec::SetSessionPtr(aHandle, aPtr); sl@0: } sl@0: #endif //__X86__