os/kernelhwsrv/kernel/eka/euser/epoc/symc/uc_exec.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kernel/eka/euser/epoc/symc/uc_exec.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,1953 @@
     1.4 +// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// e32\euser\epoc\win32\uc_exec.cpp
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +
    1.22 +//#define __GEN_USER_EXEC_CODE__
    1.23 +
    1.24 +#include "../win32/uc_std.h"
    1.25 +#include <e32svr.h>
    1.26 +#include <emulator.h>
    1.27 +
    1.28 +//
    1.29 +#include <stdlib.h>
    1.30 +#include <stdio.h>
    1.31 +
    1.32 +/**
    1.33 +Symbian compatibility executive panics
    1.34 +*/
    1.35 +enum TSymcExecPanic
    1.36 +	{
    1.37 +	ESymcExecPanicNotSupported,
    1.38 +	ESymcExecPanicHeapAlreadyExists,
    1.39 +	ESymcExecPanicCreateHeapFailed,
    1.40 +	ESymcExecPanicNotUsed
    1.41 +	};
    1.42 +
    1.43 +void Panic(TInt aReason)
    1.44 +	{
    1.45 +	_LIT(KCategory,"SYMC-Exec");
    1.46 +	User::Panic(KCategory,aReason);
    1.47 +	}
    1.48 +
    1.49 +
    1.50 +const TInt KTrapStackSize=256;
    1.51 +
    1.52 +/*
    1.53 +TODO: should we use CObject?
    1.54 +*/
    1.55 +class TThread
    1.56 +	{
    1.57 +public:
    1.58 +	
    1.59 +public:
    1.60 +	RSemaphore iRequestSemaphore;
    1.61 +	CActiveScheduler* iActiveScheduler; //Current active scheduler for this thread. Used.
    1.62 +	TTrapHandler* iHandler; //This is our cleanup stack. Used.
    1.63 +	//No idea why we need that trap stack
    1.64 +	//TTrap* iTrapStack[KTrapStackSize];
    1.65 +	//TInt iTrapCount;
    1.66 +	};
    1.67 +
    1.68 +/*
    1.69 +TODO: should we use CObject?
    1.70 +Object used to store process globals for our pseudo kernel.
    1.71 +That's typically going to be a singleton.
    1.72 +*/
    1.73 +/*
    1.74 +class TProcess
    1.75 +	{
    1.76 +public:
    1.77 +	void CreateHeap();
    1.78 +	void Free();
    1.79 +
    1.80 +public:
    1.81 +	RHeap* iAllocator;
    1.82 +	TAny* iBase;
    1.83 +	TThread iThread; //Single thread for now
    1.84 +	};
    1.85 +
    1.86 +
    1.87 +void TProcess::CreateHeap()
    1.88 +	{
    1.89 +	//iThread.iTrapCount=0;
    1.90 +	//Define the size of our heap
    1.91 +	const TInt KHeapMaxSize=1024*1024*10; // 10 Mo for now
    1.92 +	__ASSERT_ALWAYS(iAllocator==NULL && iBase==NULL,Panic(ESymcExecPanicHeapAlreadyExists));	
    1.93 +	iBase=malloc(KHeapMaxSize);
    1.94 +	__ASSERT_ALWAYS(iBase!=NULL,Panic(ESymcExecPanicCreateHeapFailed));	
    1.95 +	//TODO: is there anyway we could use variable size heap?
    1.96 +	iAllocator=UserHeap::FixedHeap(iBase,KHeapMaxSize);
    1.97 +	__ASSERT_ALWAYS(iAllocator!=NULL,Panic(ESymcExecPanicCreateHeapFailed));	
    1.98 +	}
    1.99 +
   1.100 +void TProcess::Free()
   1.101 +	{
   1.102 +	free(iBase);
   1.103 +	}
   1.104 +
   1.105 +*/
   1.106 +
   1.107 +//TProcess gProcess;
   1.108 +
   1.109 +
   1.110 +
   1.111 +//
   1.112 +
   1.113 +
   1.114 +typedef TInt (__fastcall *TDispatcher)(TInt, TInt*);
   1.115 +TInt __fastcall LazyDispatch(TInt aFunction, TInt* aArgs);
   1.116 +
   1.117 +#pragma data_seg(".data2")
   1.118 +#ifdef __VC32__
   1.119 +#pragma bss_seg(".data2")
   1.120 +#endif
   1.121 +static TDispatcher TheDispatcher = &LazyDispatch;
   1.122 +#pragma data_seg()
   1.123 +#ifdef __VC32__
   1.124 +#pragma bss_seg()
   1.125 +#endif
   1.126 +
   1.127 +TInt __fastcall LazyDispatch(TInt aFunction, TInt* aArgs)
   1.128 +	{
   1.129 +	//Panic(ESymcExecPanicNotSupported);
   1.130 +	//
   1.131 +	HINSTANCE kernel = GetModuleHandleA("ekern.exe");
   1.132 +	if (kernel)
   1.133 +		{
   1.134 +		TDispatcher dispatcher = (TDispatcher)Emulator::GetProcAddress(kernel, (LPCSTR)1);
   1.135 +		if (dispatcher)
   1.136 +			{
   1.137 +			TheDispatcher = dispatcher;
   1.138 +			return dispatcher(aFunction, aArgs);
   1.139 +			}
   1.140 +		}
   1.141 +	ExitProcess(101);
   1.142 +	return 0;
   1.143 +	}
   1.144 +
   1.145 +#include <u32exec.h>
   1.146 +
   1.147 +/******************************************************************************
   1.148 + * Slow executive calls with preprocessing or extra arguments
   1.149 + ******************************************************************************/
   1.150 +
   1.151 +__NAKED__ TInt Exec::SessionSend(TInt /*aHandle*/, TInt /*aFunction*/, TAny* /*aPtr*/, TRequestStatus* /*aStatus*/)
   1.152 +//
   1.153 +// Send a blind message to the server.
   1.154 +//
   1.155 +	{
   1.156 +	__DISPATCH(EExecSessionSend|EXECUTIVE_SLOW)
   1.157 +	}
   1.158 +
   1.159 +__NAKED__ TInt Exec::SessionSendSync(TInt /*aHandle*/, TInt /*aFunction*/, TAny* /*aPtr*/, TRequestStatus* /*aStatus*/)
   1.160 +//
   1.161 +// Send a blind message to the server using thread's dedicated message slot.
   1.162 +//
   1.163 +	{
   1.164 +	__DISPATCH(EExecSessionSendSync|EXECUTIVE_SLOW)
   1.165 +	}
   1.166 +
   1.167 +
   1.168 +__NAKED__ TInt Exec::MessageIpcCopy(TInt /*aHandle*/, TInt /*aParam*/, SIpcCopyInfo& /*aInfo*/, TInt /*anOffset*/)
   1.169 +//
   1.170 +// Perform a descriptor-to-descriptor IPC copy
   1.171 +//
   1.172 +	{
   1.173 +
   1.174 +	__DISPATCH(EExecMessageIpcCopy|EXECUTIVE_SLOW)
   1.175 +	}
   1.176 +
   1.177 +__NAKED__ TInt Exec::BTraceOut(TUint32 /*a0*/, TUint32 /*a1*/, const BTrace::SExecExtension& /*aExtension*/, TInt /*aDataSize*/)
   1.178 +	{
   1.179 +	__DISPATCH(EExecBTraceOut|EXECUTIVE_SLOW)
   1.180 +	}
   1.181 +
   1.182 +__NAKED__ TInt Exec::BTraceOutBig(TUint32 /*a0*/, TUint32 /*a1*/, const BTrace::SExecExtension& /*aExtension*/, TInt /*aDataSize*/)
   1.183 +	{
   1.184 +	__DISPATCH(EExecBTraceOutBig|EXECUTIVE_SLOW)
   1.185 +	}
   1.186 +
   1.187 +__NAKED__ TInt Exec::UTraceOut(TUint32 /*a0*/, TUint32 /*a1*/, const BTrace::SExecExtension& /*aExtension*/, TInt /*aDataSize*/)
   1.188 +	{
   1.189 +	__DISPATCH(EExecUTraceOut|EXECUTIVE_SLOW)
   1.190 +	}
   1.191 +
   1.192 +EXPORT_C TBool BTrace::Out(TUint32 a0, TUint32 a1, TUint32 a2, TUint32 a3)
   1.193 +	{
   1.194 +	BTrace::SExecExtension ext;
   1.195 +	ext.iA2 = a2;
   1.196 +	ext.iA3 = a3;
   1.197 +	ext.iPc = (&a0)[-1]; // return address on X86
   1.198 +	return Exec::BTraceOut(a0,a1,ext,0);
   1.199 +	}
   1.200 +
   1.201 +EXPORT_C TBool BTrace::OutX(TUint32 a0, TUint32 a1, TUint32 a2, TUint32 a3)
   1.202 +	{
   1.203 +	BTrace::SExecExtension ext;
   1.204 +	ext.iA2 = a2;
   1.205 +	ext.iA3 = a3;
   1.206 +	ext.iPc = (&a0)[-1]; // return address on X86
   1.207 +	return Exec::BTraceOut(a0,a1,ext,0);
   1.208 +	}
   1.209 +
   1.210 +EXPORT_C TBool BTrace::OutN(TUint32 a0, TUint32 a1, TUint32 a2, const TAny* aData, TInt aDataSize)
   1.211 +	{
   1.212 +	BTrace::SExecExtension ext;
   1.213 +	ext.iA2 = a2;
   1.214 +	ext.iA3 = (TUint32)aData;
   1.215 +	ext.iPc = (&a0)[-1]; // return address on X86
   1.216 +	return Exec::BTraceOut(a0,a1,ext,aDataSize);
   1.217 +	}
   1.218 +
   1.219 +EXPORT_C TBool BTrace::OutNX(TUint32 a0, TUint32 a1, TUint32 a2, const TAny* aData, TInt aDataSize)
   1.220 +	{
   1.221 +	BTrace::SExecExtension ext;
   1.222 +	ext.iA2 = a2;
   1.223 +	ext.iA3 = (TUint32)aData;
   1.224 +	ext.iPc = (&a0)[-1]; // return address on X86
   1.225 +	return Exec::BTraceOut(a0,a1,ext,aDataSize);
   1.226 +	}
   1.227 +
   1.228 +EXPORT_C TBool BTrace::OutBig(TUint32 a0, TUint32 a1, const TAny* aData, TInt aDataSize)
   1.229 +	{
   1.230 +	BTrace::SExecExtension ext;
   1.231 +	ext.iA2 = 0;
   1.232 +	ext.iA3 = (TUint32)aData;
   1.233 +	ext.iPc = (&a0)[-1]; // return address on X86
   1.234 +
   1.235 +	if((TUint)aDataSize>8u)
   1.236 +		{
   1.237 +		if((TUint)aDataSize>KMaxBTraceDataArray+4u)
   1.238 +			return Exec::BTraceOutBig(a0,a1,ext,aDataSize);
   1.239 +		a0 += 4;
   1.240 +		aDataSize -= 4;
   1.241 +		ext.iA2 = *((TUint32*&)aData)++;
   1.242 +		ext.iA3 = (TUint32)aData;
   1.243 +		return Exec::BTraceOut(a0,a1,ext,aDataSize);
   1.244 +		}
   1.245 +
   1.246 +	if((TUint)aDataSize>4u)
   1.247 +		ext.iA3 = ((TUint32*)aData)[1];
   1.248 +	if(aDataSize)
   1.249 +		ext.iA2 = ((TUint32*)aData)[0];
   1.250 +	a0 += aDataSize;
   1.251 +	aDataSize = 0;
   1.252 +	return Exec::BTraceOut(a0,a1,ext,aDataSize);
   1.253 +	}
   1.254 +
   1.255 +EXPORT_C TBool BTrace::OutFiltered(TUint32 a0, TUint32 a1, TUint32 a2, TUint32 a3)
   1.256 +	{
   1.257 +	BTrace::SExecExtension ext;
   1.258 +	a0 |= EMissingRecord<<BTrace::EFlagsIndex*8; // overload meaning of this flag to indicate filtered trace
   1.259 +	ext.iA2 = a2;
   1.260 +	ext.iA3 = a3;
   1.261 +	ext.iPc = (&a0)[-1]; // return address on X86
   1.262 +	return Exec::BTraceOut(a0,a1,ext,0);
   1.263 +	}
   1.264 +
   1.265 +EXPORT_C TBool BTrace::OutFilteredX(TUint32 a0, TUint32 a1, TUint32 a2, TUint32 a3)
   1.266 +	{
   1.267 +	BTrace::SExecExtension ext;
   1.268 +	a0 |= EMissingRecord<<BTrace::EFlagsIndex*8; // overload meaning of this flag to indicate filtered trace
   1.269 +	ext.iA2 = a2;
   1.270 +	ext.iA3 = a3;
   1.271 +	ext.iPc = (&a0)[-1]; // return address on X86
   1.272 +	return Exec::BTraceOut(a0,a1,ext,0);
   1.273 +	}
   1.274 +
   1.275 +EXPORT_C TBool BTrace::OutFilteredN(TUint32 a0, TUint32 a1, TUint32 a2, const TAny* aData, TInt aDataSize)
   1.276 +	{
   1.277 +	BTrace::SExecExtension ext;
   1.278 +	a0 |= EMissingRecord<<BTrace::EFlagsIndex*8; // overload meaning of this flag to indicate filtered trace
   1.279 +	ext.iA2 = a2;
   1.280 +	ext.iA3 = (TUint32)aData;
   1.281 +	ext.iPc = (&a0)[-1]; // return address on X86
   1.282 +	return Exec::BTraceOut(a0,a1,ext,aDataSize);
   1.283 +	}
   1.284 +
   1.285 +EXPORT_C TBool BTrace::OutFilteredNX(TUint32 a0, TUint32 a1, TUint32 a2, const TAny* aData, TInt aDataSize)
   1.286 +	{
   1.287 +	BTrace::SExecExtension ext;
   1.288 +	a0 |= EMissingRecord<<BTrace::EFlagsIndex*8; // overload meaning of this flag to indicate filtered trace
   1.289 +	ext.iA2 = a2;
   1.290 +	ext.iA3 = (TUint32)aData;
   1.291 +	ext.iPc = (&a0)[-1]; // return address on X86
   1.292 +	return Exec::BTraceOut(a0,a1,ext,aDataSize);
   1.293 +	}
   1.294 +
   1.295 +EXPORT_C TBool BTrace::OutFilteredBig(TUint32 a0, TUint32 a1, const TAny* aData, TInt aDataSize)
   1.296 +	{
   1.297 +	BTrace::SExecExtension ext;
   1.298 +	a0 |= EMissingRecord<<BTrace::EFlagsIndex*8; // overload meaning of this flag to indicate filtered trace
   1.299 +	ext.iA2 = 0;
   1.300 +	ext.iA3 = (TUint32)aData;
   1.301 +	ext.iPc = (&a0)[-1]; // return address on X86
   1.302 +
   1.303 +	if((TUint)aDataSize>8u)
   1.304 +		{
   1.305 +		if((TUint)aDataSize>KMaxBTraceDataArray+4u)
   1.306 +			return Exec::BTraceOutBig(a0,a1,ext,aDataSize);
   1.307 +		a0 += 4;
   1.308 +		aDataSize -= 4;
   1.309 +		ext.iA2 = *((TUint32*&)aData)++;
   1.310 +		ext.iA3 = (TUint32)aData;
   1.311 +		return Exec::BTraceOut(a0,a1,ext,aDataSize);
   1.312 +		}
   1.313 +
   1.314 +	if((TUint)aDataSize>4u)
   1.315 +		ext.iA3 = ((TUint32*)aData)[1];
   1.316 +	if(aDataSize)
   1.317 +		ext.iA2 = ((TUint32*)aData)[0];
   1.318 +	a0 += aDataSize;
   1.319 +	aDataSize = 0;
   1.320 +	return Exec::BTraceOut(a0,a1,ext,aDataSize);
   1.321 +	}
   1.322 +
   1.323 +EXPORT_C TBool BTrace::OutFilteredPcFormatBig(TUint32 aHeader, TUint32 aModuleUid, TUint32 aPc, TUint16 aFormatId, const TAny* aData, TInt aDataSize)
   1.324 +	{
   1.325 + 	BTrace::SExecExtension ext;
   1.326 +	aHeader |= EMissingRecord<<BTrace::EFlagsIndex*8; // overload meaning of this flag to indicate filtered trace
   1.327 +	ext.iA2 = aFormatId;
   1.328 +	ext.iA3 = (TUint32)aData;
   1.329 +	ext.iPc = aPc;
   1.330 +
   1.331 +	if((TUint)aDataSize>KMaxBTraceDataArray)
   1.332 +		return Exec::UTraceOut(aHeader,aModuleUid,ext,aDataSize);
   1.333 +	aHeader += 4;
   1.334 +	return Exec::BTraceOut(aHeader,aModuleUid,ext,aDataSize);
   1.335 +	}
   1.336 +
   1.337 +
   1.338 +/*
   1.339 +void ExecRequestComplete(TInt aHandle, TRequestStatus*& aStatus, TInt aReason)
   1.340 +	{
   1.341 +	//TODO: look up our thread per handle
   1.342 +	//
   1.343 +	gProcess.iThread.iRequestSemaphore.Signal();   
   1.344 +	}
   1.345 +*/
   1.346 +
   1.347 +__NAKED__ void ExecRequestComplete(TInt /*aHandle*/, TRequestStatus*& /*aStatus*/, TInt /*aReason*/)
   1.348 +	{
   1.349 +	_asm mov ecx, [esp+8]			// ecx = TRequestStatus**
   1.350 +	_asm xor eax, eax				//
   1.351 +	_asm lock xchg eax, [ecx]		// eax=TRequestStatus*, zero TRequestStatus*
   1.352 +	_asm cmp eax, 0					//
   1.353 +	_asm je ExecRequestComplete_ret
   1.354 +	_asm mov ecx, [esp+12]			// ecx = aReason
   1.355 +	_asm mov [eax], ecx				// store aReason in request status
   1.356 +	__DISPATCH(EExecThreadRequestSignal|EXECUTIVE_SLOW)
   1.357 +	_asm ExecRequestComplete_ret: ret
   1.358 +	}
   1.359 +
   1.360 +
   1.361 +
   1.362 +EXPORT_C void RThread::RequestComplete(TRequestStatus*& aStatus, TInt aReason) const
   1.363 +/**
   1.364 +Signals this thread that an asynchronous request originating from this thread,
   1.365 +is complete.
   1.366 +
   1.367 +The request is associated with the specified request status object supplied
   1.368 +by this thread.
   1.369 +
   1.370 +Typically, the caller of this function is the service provider responsible
   1.371 +for satisfying the request made by this thread.
   1.372 +
   1.373 +The request is completed with the completion code passed in aReason. This
   1.374 +value is copied into this thread's request status, *aStatus, before signalling
   1.375 +this thread's request semaphore.
   1.376 +
   1.377 +The meaning of the completion code is a matter of convention to be decided
   1.378 +between the service provider and this thread.
   1.379 +
   1.380 +In a client-server situation, completion of a request takes place in the context
   1.381 +of the server thread, but the pointer is interpreted in the address space
   1.382 +of the client.
   1.383 +
   1.384 +It is often the case in client-server situations that the client and the server
   1.385 +are in the same address space (i.e. the same process).
   1.386 +
   1.387 +Setting the pointer to the request status to NULL is a convenience, not all
   1.388 +servers need it.
   1.389 +
   1.390 +@param aStatus A reference to a pointer to the request status originally
   1.391 +               supplied by this thread. This is a pointer into this thread's
   1.392 +               address space, which may be different to the thread currently
   1.393 +               executing (this code). On return, the pointer to the request
   1.394 +               status is set to NULL.
   1.395 +
   1.396 +@param aReason The completion code of this request.
   1.397 +*/
   1.398 +	{
   1.399 +	ExecRequestComplete(iHandle,aStatus,aReason);
   1.400 +	//SL: just change the status not the flag. We do that to please the active scheduler
   1.401 +	//That's apparently the expected behavior 
   1.402 +	//aStatus->iStatus=aReason;
   1.403 +	}
   1.404 +
   1.405 +
   1.406 +
   1.407 +/**
   1.408 +Signal this threads request semaphore.
   1.409 +
   1.410 +This is similar to RThread::RequestComplete() except that no TRequestStatus object
   1.411 +is modified.
   1.412 +
   1.413 +May only be used to signal a thread in the same process as the callers.
   1.414 +
   1.415 +@panic KERN-EXEC 46 if the thread is not in the same process as the callers
   1.416 +*/
   1.417 +EXPORT_C void RThread::RequestSignal() const
   1.418 +	{
   1.419 +	Exec::ThreadRequestSignal(iHandle);
   1.420 +	}
   1.421 +
   1.422 +
   1.423 +
   1.424 +void ExitCurrentThread(TExitType aType, TInt aReason, const TDesC8* aCategory)
   1.425 +	{
   1.426 +	Exec::ThreadKill(KCurrentThreadHandle, aType, aReason, aCategory);
   1.427 +	}
   1.428 +
   1.429 +
   1.430 +//
   1.431 +#ifndef __GEN_USER_EXEC_CODE__
   1.432 +
   1.433 +
   1.434 +
   1.435 +__EXECDECL__ void Exec::WaitForAnyRequest()
   1.436 +	{
   1.437 +	FAST_EXEC0(EFastExecWaitForAnyRequest);
   1.438 +	//gProcess.iThread.iRequestSemaphore.Wait();
   1.439 +	}
   1.440 +
   1.441 +__EXECDECL__ RAllocator* Exec::Heap()
   1.442 +	{	
   1.443 +	FAST_EXEC0(EFastExecHeap);
   1.444 +	//return gProcess.iAllocator;
   1.445 +	}
   1.446 +
   1.447 +__EXECDECL__ RAllocator* Exec::HeapSwitch(RAllocator*)
   1.448 +	{
   1.449 +	FAST_EXEC1(EFastExecHeapSwitch);
   1.450 +	}
   1.451 +
   1.452 +__EXECDECL__ TTrapHandler* Exec::PushTrapFrame(TTrap* aTrap)
   1.453 +	{
   1.454 +	//Panic(ESymcExecPanicNotUsed);
   1.455 +	//return NULL;
   1.456 +	FAST_EXEC1(EFastExecPushTrapFrame);
   1.457 +	//ASSERT(gProcess.iThread.iTrapCount<=KTrapStackSize);
   1.458 +	//gProcess.iThread.iTrapStack[gProcess.iThread.iTrapCount++]=aTrap;
   1.459 +	//return gProcess.iThread.iHandler;
   1.460 +	}
   1.461 +
   1.462 +__EXECDECL__ TTrap* Exec::PopTrapFrame()
   1.463 +	{
   1.464 +	//Panic(ESymcExecPanicNotUsed);
   1.465 +	//return NULL;
   1.466 +	FAST_EXEC0(EFastExecPopTrapFrame);
   1.467 +	//ASSERT(gProcess.iThread.iTrapCount>0);
   1.468 +	//return gProcess.iThread.iTrapStack[gProcess.iThread.iTrapCount--];
   1.469 +	}
   1.470 +
   1.471 +__EXECDECL__ CActiveScheduler* Exec::ActiveScheduler()
   1.472 +	{
   1.473 +	FAST_EXEC0(EFastExecActiveScheduler);
   1.474 +	//return gProcess.iThread.iActiveScheduler;
   1.475 +	}
   1.476 +
   1.477 +__EXECDECL__ void Exec::SetActiveScheduler(CActiveScheduler* aActiveScheduler)
   1.478 +	{
   1.479 +	FAST_EXEC1(EFastExecSetActiveScheduler);
   1.480 +	//gProcess.iThread.iActiveScheduler=aActiveScheduler;
   1.481 +	}
   1.482 +
   1.483 +__EXECDECL__ TTimerLockSpec Exec::LockPeriod()
   1.484 +	{
   1.485 +	FAST_EXEC0(EFastExecLockPeriod);
   1.486 +	}
   1.487 +
   1.488 +__EXECDECL__ TTrapHandler* Exec::TrapHandler()
   1.489 +	{
   1.490 +	FAST_EXEC0(EFastExecTrapHandler);
   1.491 +	//return gProcess.iThread.iHandler;
   1.492 +	}
   1.493 +
   1.494 +__EXECDECL__ TTrapHandler* Exec::SetTrapHandler(TTrapHandler* aHandler)
   1.495 +	{	
   1.496 +	FAST_EXEC1(EFastExecSetTrapHandler);
   1.497 +	//TTrapHandler* prev=gProcess.iThread.iHandler;
   1.498 +	//gProcess.iThread.iHandler=aHandler;
   1.499 +	//return prev;
   1.500 +	}
   1.501 +
   1.502 +__EXECDECL__ TUint32 Exec::DebugMask()
   1.503 +	{
   1.504 +	FAST_EXEC0(EFastExecDebugMask);
   1.505 +	}
   1.506 +
   1.507 +__EXECDECL__ TUint32 Exec::DebugMaskIndex(TUint)
   1.508 +	{
   1.509 +	FAST_EXEC1(EFastExecDebugMaskIndex);
   1.510 +	}
   1.511 +
   1.512 +__EXECDECL__ void Exec::SetDebugMask(TUint32)
   1.513 +	{
   1.514 +	FAST_EXEC1(EFastExecSetDebugMask);
   1.515 +	}
   1.516 +
   1.517 +__EXECDECL__ TUint32 Exec::FastCounter()
   1.518 +	{
   1.519 +	FAST_EXEC0(EFastExecFastCounter);
   1.520 +	}
   1.521 +
   1.522 +__EXECDECL__ TUint32 Exec::NTickCount()
   1.523 +	{
   1.524 +	FAST_EXEC0(EFastExecNTickCount);
   1.525 +	}
   1.526 +
   1.527 +EXPORT_C __EXECDECL__ void UserSvr::LockRamDrive()
   1.528 +	{
   1.529 +	FAST_EXEC0(EFastExecLockRamDrive);
   1.530 +	}
   1.531 +
   1.532 +EXPORT_C __EXECDECL__ void UserSvr::UnlockRamDrive()
   1.533 +	{
   1.534 +	FAST_EXEC0(EFastExecUnlockRamDrive);
   1.535 +	}
   1.536 +
   1.537 +EXPORT_C __EXECDECL__ TLinAddr UserSvr::RomHeaderAddress()
   1.538 +	{
   1.539 +	FAST_EXEC0(EFastExecRomHeaderAddress);
   1.540 +	}
   1.541 +
   1.542 +EXPORT_C __EXECDECL__ TLinAddr UserSvr::RomRootDirectoryAddress()
   1.543 +	{
   1.544 +	FAST_EXEC0(EFastExecRomRootDirectoryAddress);
   1.545 +	}
   1.546 +
   1.547 +__EXECDECL__ void Exec::SetReentryPoint(TLinAddr)
   1.548 +	{
   1.549 +	FAST_EXEC1(EFastExecSetReentryPoint);
   1.550 +	}
   1.551 +
   1.552 +__EXECDECL__ TUint32 Exec::KernelConfigFlags()
   1.553 +	{
   1.554 +	FAST_EXEC0(EFastExecKernelConfigFlags);
   1.555 +	}
   1.556 +
   1.557 +__EXECDECL__ TInt Exec::UTCOffset()
   1.558 +	{
   1.559 +	FAST_EXEC0(EFastExecUTCOffset);
   1.560 +	}
   1.561 +
   1.562 +__EXECDECL__ TInt Exec::GetGlobalUserData(TInt)
   1.563 +	{
   1.564 +	FAST_EXEC1(EFastExecGetGlobalUserData);
   1.565 +	}
   1.566 +
   1.567 +EXPORT_C __EXECDECL__ TBool BTrace::CheckFilter(TUint32)
   1.568 +	{
   1.569 +	FAST_EXEC1(EFastExecCheckFilter);
   1.570 +	}
   1.571 +
   1.572 +__EXECDECL__ TInt Exec::ObjectNext(TObjectType, TBuf8<KMaxFullName>&, TFindHandle&)
   1.573 +	{
   1.574 +	SLOW_EXEC3(EExecObjectNext);
   1.575 +	}
   1.576 +
   1.577 +__EXECDECL__ TUint8* Exec::ChunkBase(TInt)
   1.578 +	{
   1.579 +	SLOW_EXEC1(EExecChunkBase);
   1.580 +	}
   1.581 +
   1.582 +__EXECDECL__ TInt Exec::ChunkSize(TInt)
   1.583 +	{
   1.584 +	SLOW_EXEC1(EExecChunkSize);
   1.585 +	}
   1.586 +
   1.587 +__EXECDECL__ TInt Exec::ChunkMaxSize(TInt)
   1.588 +	{
   1.589 +	SLOW_EXEC1(EExecChunkMaxSize);
   1.590 +	}
   1.591 +
   1.592 +__EXECDECL__ TUint Exec::HandleAttributes(TInt)
   1.593 +	{
   1.594 +	SLOW_EXEC1(EExecHandleAttributes);
   1.595 +	}
   1.596 +
   1.597 +__EXECDECL__ TUint Exec::TickCount()
   1.598 +	{
   1.599 +	SLOW_EXEC0(EExecTickCount);
   1.600 +	}
   1.601 +
   1.602 +__EXECDECL__ void Exec::LogicalDeviceGetCaps(TInt, TDes8&)
   1.603 +	{
   1.604 +	SLOW_EXEC2(EExecLogicalDeviceGetCaps);
   1.605 +	}
   1.606 +
   1.607 +__EXECDECL__ TBool Exec::LogicalDeviceQueryVersionSupported(TInt, const TVersion&)
   1.608 +	{
   1.609 +	SLOW_EXEC2(EExecLogicalDeviceQueryVersionSupported);
   1.610 +	}
   1.611 +
   1.612 +__EXECDECL__ TBool Exec::LogicalDeviceIsAvailable(TInt, TInt, const TDesC8*, const TDesC8*)
   1.613 +	{
   1.614 +	SLOW_EXEC4(EExecLogicalDeviceIsAvailable);
   1.615 +	}
   1.616 +
   1.617 +EXPORT_C __EXECDECL__ TInt E32Loader::LocaleExports(TAny*, TLibraryFunction*)
   1.618 +	{
   1.619 +	SLOW_EXEC2(EExecLocaleExports);
   1.620 +	}
   1.621 +
   1.622 +__EXECDECL__ TInt Exec::ChannelRequest(TInt, TInt, TAny*, TAny*)
   1.623 +	{
   1.624 +	SLOW_EXEC4(EExecChannelRequest);
   1.625 +	}
   1.626 +
   1.627 +__EXECDECL__ TUint32 Exec::MathRandom()
   1.628 +	{
   1.629 +	SLOW_EXEC0(EExecMathRandom);
   1.630 +	}
   1.631 +
   1.632 +__EXECDECL__ void Exec::IMB_Range(TAny*, TUint)
   1.633 +	{
   1.634 +	SLOW_EXEC2(EExecIMBRange);
   1.635 +	}
   1.636 +
   1.637 +__EXECDECL__ TInt Exec::ResetMachine(TMachineStartupType)
   1.638 +	{
   1.639 +	SLOW_EXEC1(EExecResetMachine);
   1.640 +	}
   1.641 +
   1.642 +__EXECDECL__ TLibraryFunction Exec::LibraryLookup(TInt, TInt)
   1.643 +	{
   1.644 +	SLOW_EXEC2(EExecLibraryLookup);
   1.645 +	}
   1.646 +
   1.647 +__EXECDECL__ void Exec::LibraryFileName(TInt, TDes8&)
   1.648 +	{
   1.649 +	SLOW_EXEC2(EExecLibraryFileName);
   1.650 +	}
   1.651 +
   1.652 +EXPORT_C __EXECDECL__ TInt UserSvr::ExecuteInSupervisorMode(TSupervisorFunction, TAny*)
   1.653 +	{
   1.654 +	SLOW_EXEC2(EExecExecuteInSupervisorMode);
   1.655 +	}
   1.656 +
   1.657 +__EXECDECL__ void Exec::MutexWait(TInt)
   1.658 +	{
   1.659 +	SLOW_EXEC1(EExecMutexWait);
   1.660 +	}
   1.661 +
   1.662 +__EXECDECL__ void Exec::MutexSignal(TInt)
   1.663 +	{
   1.664 +	SLOW_EXEC1(EExecMutexSignal);
   1.665 +	}
   1.666 +
   1.667 +__EXECDECL__ TInt Exec::ProcessId(TInt)
   1.668 +	{
   1.669 +	SLOW_EXEC1(EExecProcessId);
   1.670 +	}
   1.671 +
   1.672 +__EXECDECL__ void Exec::DllFileName(TInt, TDes8&)
   1.673 +	{
   1.674 +	SLOW_EXEC2(EExecDllFileName);
   1.675 +	}
   1.676 +
   1.677 +__EXECDECL__ void Exec::ProcessResume(TInt)
   1.678 +	{
   1.679 +	SLOW_EXEC1(EExecProcessResume);
   1.680 +	}
   1.681 +
   1.682 +__EXECDECL__ void Exec::ProcessFileName(TInt, TDes8&)
   1.683 +	{
   1.684 +	SLOW_EXEC2(EExecProcessFileName);
   1.685 +	}
   1.686 +
   1.687 +__EXECDECL__ void Exec::ProcessCommandLine(TInt, TDes8&)
   1.688 +	{
   1.689 +	SLOW_EXEC2(EExecProcessCommandLine);
   1.690 +	}
   1.691 +
   1.692 +__EXECDECL__ TExitType Exec::ProcessExitType(TInt)
   1.693 +	{
   1.694 +	SLOW_EXEC1(EExecProcessExitType);
   1.695 +	}
   1.696 +
   1.697 +__EXECDECL__ TInt Exec::ProcessExitReason(TInt)
   1.698 +	{
   1.699 +	SLOW_EXEC1(EExecProcessExitReason);
   1.700 +	}
   1.701 +
   1.702 +__EXECDECL__ void Exec::ProcessExitCategory(TInt, TDes8&)
   1.703 +	{
   1.704 +	SLOW_EXEC2(EExecProcessExitCategory);
   1.705 +	}
   1.706 +
   1.707 +__EXECDECL__ TProcessPriority Exec::ProcessPriority(TInt)
   1.708 +	{
   1.709 +	SLOW_EXEC1(EExecProcessPriority);
   1.710 +	}
   1.711 +
   1.712 +__EXECDECL__ TInt Exec::ProcessSetPriority(TInt, TProcessPriority)
   1.713 +	{
   1.714 +	SLOW_EXEC2(EExecProcessSetPriority);
   1.715 +	}
   1.716 +
   1.717 +__EXECDECL__ TUint Exec::ProcessFlags(TInt)
   1.718 +	{
   1.719 +	SLOW_EXEC1(EExecProcessFlags);
   1.720 +	}
   1.721 +
   1.722 +__EXECDECL__ void Exec::ProcessSetFlags(TInt, TUint, TUint)
   1.723 +	{
   1.724 +	SLOW_EXEC3(EExecProcessSetFlags);
   1.725 +	}
   1.726 +
   1.727 +__EXECDECL__ TInt Exec::SemaphoreWait(TInt aHandle, TInt aTimeout)
   1.728 +	{
   1.729 +	SLOW_EXEC2(EExecSemaphoreWait);
   1.730 +		/*
   1.731 +#ifdef WIN32
   1.732 +      DWORD dwMilliseconds=INFINITE;
   1.733 +      if (aTimeout!=0) //0 means infinite apparently on symbian
   1.734 +         {
   1.735 +         //Timeout is not infinite convert it from micro to milliseconds
   1.736 +         dwMilliseconds=aTimeout/1000;
   1.737 +         }
   1.738 +
   1.739 +      //Issues win32 wait
   1.740 +      WaitForSingleObject((HANDLE)aHandle,dwMilliseconds);
   1.741 +#else
   1.742 +#error "Platform not supported"
   1.743 +#endif
   1.744 +   
   1.745 +      //Returned value is not even checked in RSemaphore::Wait
   1.746 +   return KErrNone; 
   1.747 +   */
   1.748 +	}
   1.749 +
   1.750 +__EXECDECL__ void Exec::SemaphoreSignal1(TInt aHandle)
   1.751 +	{
   1.752 +/*
   1.753 +#ifdef WIN32
   1.754 +   ReleaseSemaphore((HANDLE)aHandle,1,NULL);
   1.755 +#else
   1.756 +#error "Platform not supported"
   1.757 +#endif
   1.758 +*/
   1.759 +	SLOW_EXEC1(EExecSemaphoreSignal1);
   1.760 +	}
   1.761 +
   1.762 +__EXECDECL__ void Exec::SemaphoreSignalN(TInt aHandle, TInt aCount)
   1.763 +	{
   1.764 +/*
   1.765 +#ifdef WIN32
   1.766 +      ReleaseSemaphore((HANDLE)aHandle,aCount,NULL);
   1.767 +#else
   1.768 +#error "Platform not supported"
   1.769 +#endif
   1.770 +*/
   1.771 +	SLOW_EXEC2(EExecSemaphoreSignalN);
   1.772 +	}
   1.773 +
   1.774 +__EXECDECL__ void Exec::ServerReceive(TInt, TRequestStatus&, TAny*)
   1.775 +	{
   1.776 +	SLOW_EXEC3(EExecServerReceive);
   1.777 +	}
   1.778 +
   1.779 +__EXECDECL__ void Exec::ServerCancel(TInt)
   1.780 +	{
   1.781 +	SLOW_EXEC1(EExecServerCancel);
   1.782 +	}
   1.783 +
   1.784 +__EXECDECL__ void Exec::SetSessionPtr(TInt, const TAny*)
   1.785 +	{
   1.786 +	SLOW_EXEC2(EExecSetSessionPtr);
   1.787 +	}
   1.788 +
   1.789 +__EXECDECL__ TInt Exec::ThreadId(TInt)
   1.790 +	{
   1.791 +	SLOW_EXEC1(EExecThreadId);
   1.792 +	}
   1.793 +
   1.794 +__EXECDECL__ TInt Exec::SessionShare(TInt&, TInt)
   1.795 +	{
   1.796 +	SLOW_EXEC2(EExecSessionShare);
   1.797 +	}
   1.798 +
   1.799 +__EXECDECL__ void Exec::ThreadResume(TInt)
   1.800 +	{
   1.801 +	SLOW_EXEC1(EExecThreadResume);
   1.802 +	}
   1.803 +
   1.804 +__EXECDECL__ void Exec::ThreadSuspend(TInt)
   1.805 +	{
   1.806 +	SLOW_EXEC1(EExecThreadSuspend);
   1.807 +	}
   1.808 +
   1.809 +__EXECDECL__ TThreadPriority Exec::ThreadPriority(TInt)
   1.810 +	{
   1.811 +	SLOW_EXEC1(EExecThreadPriority);
   1.812 +	}
   1.813 +
   1.814 +__EXECDECL__ void Exec::ThreadSetPriority(TInt, TThreadPriority)
   1.815 +	{
   1.816 +	SLOW_EXEC2(EExecThreadSetPriority);
   1.817 +	}
   1.818 +
   1.819 +__EXECDECL__ TProcessPriority Exec::ThreadProcessPriority(TInt)
   1.820 +	{
   1.821 +	SLOW_EXEC1(EExecThreadProcessPriority);
   1.822 +	}
   1.823 +
   1.824 +__EXECDECL__ void Exec::ThreadSetProcessPriority(TInt, TProcessPriority)
   1.825 +	{
   1.826 +	SLOW_EXEC2(EExecThreadSetProcessPriority);
   1.827 +	}
   1.828 +
   1.829 +__EXECDECL__ TUint Exec::ThreadFlags(TInt)
   1.830 +	{
   1.831 +	SLOW_EXEC1(EExecThreadFlags);
   1.832 +	}
   1.833 +
   1.834 +__EXECDECL__ void Exec::ThreadSetFlags(TInt, TUint, TUint)
   1.835 +	{
   1.836 +	SLOW_EXEC3(EExecThreadSetFlags);
   1.837 +	}
   1.838 +
   1.839 +__EXECDECL__ TInt Exec::ThreadRequestCount(TInt)
   1.840 +	{
   1.841 +	SLOW_EXEC1(EExecThreadRequestCount);
   1.842 +	}
   1.843 +
   1.844 +__EXECDECL__ TExitType Exec::ThreadExitType(TInt)
   1.845 +	{
   1.846 +	SLOW_EXEC1(EExecThreadExitType);
   1.847 +	}
   1.848 +
   1.849 +__EXECDECL__ TInt Exec::ThreadExitReason(TInt)
   1.850 +	{
   1.851 +	SLOW_EXEC1(EExecThreadExitReason);
   1.852 +	}
   1.853 +
   1.854 +__EXECDECL__ void Exec::ThreadExitCategory(TInt, TDes8&)
   1.855 +	{
   1.856 +	SLOW_EXEC2(EExecThreadExitCategory);
   1.857 +	}
   1.858 +
   1.859 +__EXECDECL__ void Exec::TimerCancel(TInt)
   1.860 +	{
   1.861 +	SLOW_EXEC1(EExecTimerCancel);
   1.862 +	}
   1.863 +
   1.864 +__EXECDECL__ void Exec::TimerAfter(TInt, TRequestStatus&, TInt)
   1.865 +	{
   1.866 +	SLOW_EXEC3(EExecTimerAfter);
   1.867 +	}
   1.868 +
   1.869 +__EXECDECL__ void Exec::TimerAt(TInt, TRequestStatus&, TUint32, TUint32)
   1.870 +	{
   1.871 +	SLOW_EXEC4(EExecTimerAt);
   1.872 +	}
   1.873 +
   1.874 +__EXECDECL__ void Exec::TimerLock(TInt, TRequestStatus&, TTimerLockSpec)
   1.875 +	{
   1.876 +	SLOW_EXEC3(EExecTimerLock);
   1.877 +	}
   1.878 +
   1.879 +__EXECDECL__ TInt Exec::ChangeNotifierLogon(TInt, TRequestStatus&)
   1.880 +	{
   1.881 +	SLOW_EXEC2(EExecChangeNotifierLogon);
   1.882 +	}
   1.883 +
   1.884 +__EXECDECL__ TInt Exec::ChangeNotifierLogoff(TInt)
   1.885 +	{
   1.886 +	SLOW_EXEC1(EExecChangeNotifierLogoff);
   1.887 +	}
   1.888 +
   1.889 +__EXECDECL__ void Exec::RequestSignal(TInt)
   1.890 +	{
   1.891 +	SLOW_EXEC1(EExecRequestSignal);
   1.892 +	}
   1.893 +
   1.894 +__EXECDECL__ void Exec::HandleName(TInt, TDes8&)
   1.895 +	{
   1.896 +	SLOW_EXEC2(EExecHandleName);
   1.897 +	}
   1.898 +
   1.899 +__EXECDECL__ void Exec::HandleFullName(TInt, TDes8&)
   1.900 +	{
   1.901 +	SLOW_EXEC2(EExecHandleFullName);
   1.902 +	}
   1.903 +
   1.904 +__EXECDECL__ void Exec::HandleInfo(TInt, THandleInfo*)
   1.905 +	{
   1.906 +	SLOW_EXEC2(EExecHandleInfo);
   1.907 +	}
   1.908 +
   1.909 +__EXECDECL__ void Exec::HandleCount(TInt, TInt&, TInt&)
   1.910 +	{
   1.911 +	SLOW_EXEC3(EExecHandleCount);
   1.912 +	}
   1.913 +
   1.914 +__EXECDECL__ void Exec::After(TInt, TRequestStatus&)
   1.915 +	{
   1.916 +	SLOW_EXEC2(EExecAfter);
   1.917 +	}
   1.918 +
   1.919 +__EXECDECL__ void Exec::At(const EXEC_TIME&, TRequestStatus&)
   1.920 +	{
   1.921 +	SLOW_EXEC2(EExecAt);
   1.922 +	}
   1.923 +
   1.924 +__EXECDECL__ void Exec::MessageComplete(TInt, TInt)
   1.925 +	{
   1.926 +	SLOW_EXEC2(EExecMessageComplete);
   1.927 +	}
   1.928 +
   1.929 +__EXECDECL__ void Exec::MessageCompleteWithHandle(TInt, TInt)
   1.930 +	{
   1.931 +	SLOW_EXEC2(EExecMessageCompleteWithHandle);
   1.932 +	}
   1.933 +
   1.934 +__EXECDECL__ void Exec::TransferSession(TInt, TInt)
   1.935 +	{
   1.936 +	SLOW_EXEC2(EExecTransferSession);
   1.937 +	}
   1.938 +
   1.939 +__EXECDECL__ TInt Exec::TimeNow(EXEC_TIME&, TInt&)
   1.940 +	{
   1.941 +	SLOW_EXEC2(EExecTimeNow);
   1.942 +	}
   1.943 +
   1.944 +__EXECDECL__ TInt Exec::TimeNowSecure(EXEC_TIME&, TInt&)
   1.945 +	{
   1.946 +	SLOW_EXEC2(EExecTimeNowSecure);
   1.947 +	}
   1.948 +
   1.949 +__EXECDECL__ TInt Exec::SetUTCTimeAndOffset(const EXEC_TIME&, TInt, TUint, TUint)
   1.950 +	{
   1.951 +	SLOW_EXEC4(EExecSetUTCTimeAndOffset);
   1.952 +	}
   1.953 +
   1.954 +__EXECDECL__ TInt Exec::SetMachineConfiguration(const TDesC8&)
   1.955 +	{
   1.956 +	SLOW_EXEC1(EExecSetMachineConfiguration);
   1.957 +	}
   1.958 +
   1.959 +__EXECDECL__ void Exec::CaptureEventHook()
   1.960 +	{
   1.961 +	SLOW_EXEC0(EExecCaptureEventHook);
   1.962 +	}
   1.963 +
   1.964 +__EXECDECL__ void Exec::ReleaseEventHook()
   1.965 +	{
   1.966 +	SLOW_EXEC0(EExecReleaseEventHook);
   1.967 +	}
   1.968 +
   1.969 +__EXECDECL__ void Exec::RequestEvent(TRawEventBuf&, TRequestStatus&)
   1.970 +	{
   1.971 +	SLOW_EXEC2(EExecRequestEvent);
   1.972 +	}
   1.973 +
   1.974 +__EXECDECL__ void Exec::RequestEventCancel()
   1.975 +	{
   1.976 +	SLOW_EXEC0(EExecRequestEventCancel);
   1.977 +	}
   1.978 +
   1.979 +__EXECDECL__ TInt Exec::AddEvent(const TRawEvent&)
   1.980 +	{
   1.981 +	SLOW_EXEC1(EExecAddEvent);
   1.982 +	}
   1.983 +
   1.984 +__EXECDECL__ TAny* Exec::DllTls(TInt aHandle, TInt aDllUid)
   1.985 +	{
   1.986 +	SLOW_EXEC2(EExecDllTls);
   1.987 +	/*
   1.988 +	if (aHandle==-1 && aDllUid==-1)
   1.989 +		{
   1.990 +		//No TGlobalDestructorFunc ATM
   1.991 +		return NULL;
   1.992 +		}
   1.993 +	else
   1.994 +		{
   1.995 +		//No sure what to do here
   1.996 +		__BREAKPOINT();
   1.997 +		}
   1.998 +	*/
   1.999 +	}
  1.1000 +
  1.1001 +__EXECDECL__ TInt Exec::HalFunction(TInt, TInt, TAny*, TAny*)
  1.1002 +	{
  1.1003 +	SLOW_EXEC4(EExecHalFunction);
  1.1004 +	}
  1.1005 +
  1.1006 +__EXECDECL__ void Exec::WsRegisterThread()
  1.1007 +	{
  1.1008 +	SLOW_EXEC0(EExecWsRegisterThread);
  1.1009 +	}
  1.1010 +
  1.1011 +__EXECDECL__ void Exec::FsRegisterThread()
  1.1012 +	{
  1.1013 +	SLOW_EXEC0(EExecFsRegisterThread);
  1.1014 +	}
  1.1015 +
  1.1016 +__EXECDECL__ TInt Exec::ProcessCommandLineLength(TInt)
  1.1017 +	{
  1.1018 +	SLOW_EXEC1(EExecProcessCommandLineLength);
  1.1019 +	}
  1.1020 +
  1.1021 +__EXECDECL__ void Exec::TimerInactivity(TInt, TRequestStatus&, TInt)
  1.1022 +	{
  1.1023 +	SLOW_EXEC3(EExecTimerInactivity);
  1.1024 +	}
  1.1025 +
  1.1026 +__EXECDECL__ TInt Exec::UserInactivityTime()
  1.1027 +	{
  1.1028 +	SLOW_EXEC0(EExecUserInactivityTime);
  1.1029 +	}
  1.1030 +
  1.1031 +__EXECDECL__ void Exec::ResetInactivityTime()
  1.1032 +	{
  1.1033 +	SLOW_EXEC0(EExecResetInactivityTime);
  1.1034 +	}
  1.1035 +
  1.1036 +__EXECDECL__ void Exec::DebugPrint(TAny*, TInt)
  1.1037 +	{
  1.1038 +	SLOW_EXEC2(EExecDebugPrint);
  1.1039 +	}
  1.1040 +
  1.1041 +__EXECDECL__ TInt Exec::BreakPoint()
  1.1042 +	{
  1.1043 +	SLOW_EXEC0(EExecBreakPoint);
  1.1044 +	}
  1.1045 +
  1.1046 +__EXECDECL__ TInt Exec::ProfileStart(TInt)
  1.1047 +	{
  1.1048 +	SLOW_EXEC1(EExecProfileStart);
  1.1049 +	}
  1.1050 +
  1.1051 +__EXECDECL__ TInt Exec::ProfileEnd(TInt)
  1.1052 +	{
  1.1053 +	SLOW_EXEC1(EExecProfileEnd);
  1.1054 +	}
  1.1055 +
  1.1056 +__EXECDECL__ TExceptionHandler Exec::ExceptionHandler(TInt)
  1.1057 +	{
  1.1058 +	SLOW_EXEC1(EExecExceptionHandler);
  1.1059 +	}
  1.1060 +
  1.1061 +__EXECDECL__ TInt Exec::SetExceptionHandler(TInt, TExceptionHandler, TUint32)
  1.1062 +	{
  1.1063 +	SLOW_EXEC3(EExecSetExceptionHandler);
  1.1064 +	}
  1.1065 +
  1.1066 +__EXECDECL__ void Exec::ModifyExceptionMask(TInt, TUint32, TUint32)
  1.1067 +	{
  1.1068 +	SLOW_EXEC3(EExecModifyExceptionMask);
  1.1069 +	}
  1.1070 +
  1.1071 +__EXECDECL__ TInt Exec::RaiseException(TInt, TExcType)
  1.1072 +	{
  1.1073 +	SLOW_EXEC2(EExecRaiseException);
  1.1074 +	}
  1.1075 +
  1.1076 +__EXECDECL__ TInt Exec::IsExceptionHandled(TInt, TExcType, TBool)
  1.1077 +	{
  1.1078 +	SLOW_EXEC3(EExecIsExceptionHandled);
  1.1079 +	}
  1.1080 +
  1.1081 +__EXECDECL__ TInt Exec::ProcessGetMemoryInfo(TInt, TModuleMemoryInfo&)
  1.1082 +	{
  1.1083 +	SLOW_EXEC2(EExecProcessGetMemoryInfo);
  1.1084 +	}
  1.1085 +
  1.1086 +__EXECDECL__ TInt Exec::LibraryGetMemoryInfo(TInt, TModuleMemoryInfo&)
  1.1087 +	{
  1.1088 +	SLOW_EXEC2(EExecLibraryGetMemoryInfo);
  1.1089 +	}
  1.1090 +
  1.1091 +__EXECDECL__ TInt Exec::MachineConfiguration(TDes8&, TInt&)
  1.1092 +	{
  1.1093 +	SLOW_EXEC2(EExecMachineConfiguration);
  1.1094 +	}
  1.1095 +
  1.1096 +__EXECDECL__ TInt Exec::SetMemoryThresholds(TInt, TInt)
  1.1097 +	{
  1.1098 +	SLOW_EXEC2(EExecSetMemoryThresholds);
  1.1099 +	}
  1.1100 +
  1.1101 +__EXECDECL__ void Exec::LibraryType(TInt, TUidType&)
  1.1102 +	{
  1.1103 +	SLOW_EXEC2(EExecLibraryType);
  1.1104 +	}
  1.1105 +
  1.1106 +__EXECDECL__ void Exec::ProcessType(TInt, TUidType&)
  1.1107 +	{
  1.1108 +	SLOW_EXEC2(EExecProcessType);
  1.1109 +	}
  1.1110 +
  1.1111 +__EXECDECL__ TInt Exec::ChunkBottom(TInt)
  1.1112 +	{
  1.1113 +	SLOW_EXEC1(EExecChunkBottom);
  1.1114 +	}
  1.1115 +
  1.1116 +__EXECDECL__ TInt Exec::ChunkTop(TInt)
  1.1117 +	{
  1.1118 +	SLOW_EXEC1(EExecChunkTop);
  1.1119 +	}
  1.1120 +
  1.1121 +__EXECDECL__ void Exec::ThreadContext(TInt, TDes8&)
  1.1122 +	{
  1.1123 +	SLOW_EXEC2(EExecThreadContext);
  1.1124 +	}
  1.1125 +
  1.1126 +__EXECDECL__ TInt Exec::ThreadCreate(const TDesC8&, TOwnerType, SThreadCreateInfo8&)
  1.1127 +	{
  1.1128 +	SLOW_EXEC3(EExecThreadCreate);
  1.1129 +	}
  1.1130 +
  1.1131 +__EXECDECL__ TInt Exec::FindHandleOpen(TOwnerType, const TFindHandle&)
  1.1132 +	{
  1.1133 +	SLOW_EXEC2(EExecFindHandleOpen);
  1.1134 +	}
  1.1135 +
  1.1136 +__EXECDECL__ TInt Exec::HandleClose(TInt)
  1.1137 +	{
  1.1138 +	SLOW_EXEC1(EExecHandleClose);
  1.1139 +	}
  1.1140 +
  1.1141 +__EXECDECL__ TInt Exec::ChunkCreate(TOwnerType, const TDesC8*, TChunkCreate&)
  1.1142 +	{
  1.1143 +	SLOW_EXEC3(EExecChunkCreate);
  1.1144 +	}
  1.1145 +
  1.1146 +__EXECDECL__ TInt Exec::ChunkAdjust(TInt, TInt, TInt, TInt)
  1.1147 +	{
  1.1148 +	SLOW_EXEC4(EExecChunkAdjust);
  1.1149 +	}
  1.1150 +
  1.1151 +__EXECDECL__ TInt Exec::OpenObject(TObjectType, const TDesC8&, TOwnerType)
  1.1152 +	{
  1.1153 +	SLOW_EXEC3(EExecOpenObject);
  1.1154 +	}
  1.1155 +
  1.1156 +__EXECDECL__ TInt Exec::HandleDuplicate(TInt, TOwnerType, TInt&)
  1.1157 +	{
  1.1158 +	SLOW_EXEC3(EExecHandleDuplicate);
  1.1159 +	}
  1.1160 +
  1.1161 +__EXECDECL__ TInt Exec::MutexCreate(const TDesC8*, TOwnerType)
  1.1162 +	{
  1.1163 +	SLOW_EXEC2(EExecMutexCreate);
  1.1164 +	}
  1.1165 +
  1.1166 +__EXECDECL__ TInt Exec::SemaphoreCreate(const TDesC8* aName, TInt aCount, TOwnerType aType)
  1.1167 +	{
  1.1168 +	//__asm lea	edx, [esp + 0x4]
  1.1169 +	//__asm mov	ecx, (EExecSemaphoreCreate)	
  1.1170 +	//__asm jmp  [TheDispatcher]
  1.1171 +
  1.1172 +	SLOW_EXEC3(EExecSemaphoreCreate);
  1.1173 +
  1.1174 +	/*
  1.1175 +#ifdef _WINDOWS
  1.1176 +	HANDLE semaphore = CreateSemaphore( 
  1.1177 +		NULL,								// default security attributes
  1.1178 +		aCount,
  1.1179 +		KMaxTInt,
  1.1180 +		//TODO: use the name
  1.1181 +		NULL);								// unnamed mutex
  1.1182 +
  1.1183 +	if (semaphore)
  1.1184 +		{
  1.1185 +		//success
  1.1186 +		return (TInt)semaphore;
  1.1187 +		}
  1.1188 +
  1.1189 +	//failure
  1.1190 +	return NULL;
  1.1191 +#else
  1.1192 +	//TODO: pthread implementation
  1.1193 +	Panic(ESymcExecPanicNotSupported);
  1.1194 +#endif
  1.1195 +	*/
  1.1196 +	}
  1.1197 +
  1.1198 +__EXECDECL__ TInt Exec::ThreadOpenById(TUint, TOwnerType)
  1.1199 +	{
  1.1200 +	SLOW_EXEC2(EExecThreadOpenById);
  1.1201 +	}
  1.1202 +
  1.1203 +__EXECDECL__ TInt Exec::ProcessOpenById(TUint, TOwnerType)
  1.1204 +	{
  1.1205 +	SLOW_EXEC2(EExecProcessOpenById);
  1.1206 +	}
  1.1207 +
  1.1208 +__EXECDECL__ void Exec::ThreadKill(TInt aThreadHandle, TExitType aType, TInt aReason, const TDesC8* aCategory)
  1.1209 +	{
  1.1210 +	SLOW_EXEC4(EExecThreadKill);
  1.1211 +/*
  1.1212 +	if (aThreadHandle!=KCurrentThreadHandle)
  1.1213 +		{
  1.1214 +		//Not sure how to do that yet
  1.1215 +		__BREAKPOINT();
  1.1216 +		return;
  1.1217 +		}
  1.1218 +
  1.1219 +	if (aType==EExitPanic)
  1.1220 +		{
  1.1221 +		//Display message
  1.1222 +#ifdef _WINDOWS
  1.1223 +		TBuf8<256> buf;
  1.1224 +		buf.Copy(*aCategory);	
  1.1225 +		char errstr[256]; sprintf(errstr, "Category: %s\nReason: %d",buf.PtrZ(),aReason);
  1.1226 +		MessageBoxA(NULL,errstr, "PANIC", MB_OK | MB_ICONERROR);	
  1.1227 +#endif
  1.1228 +		__BREAKPOINT();
  1.1229 +		}
  1.1230 +	
  1.1231 +	exit(aType);
  1.1232 +*/
  1.1233 +	}
  1.1234 +
  1.1235 +__EXECDECL__ void Exec::ThreadLogon(TInt, TRequestStatus*, TBool)
  1.1236 +	{
  1.1237 +	SLOW_EXEC3(EExecThreadLogon);
  1.1238 +	}
  1.1239 +
  1.1240 +__EXECDECL__ TInt Exec::ThreadLogonCancel(TInt, TRequestStatus*, TBool)
  1.1241 +	{
  1.1242 +	SLOW_EXEC3(EExecThreadLogonCancel);
  1.1243 +	}
  1.1244 +
  1.1245 +__EXECDECL__ TInt Exec::DllSetTls(TInt, TInt, TAny*)
  1.1246 +	{
  1.1247 +	SLOW_EXEC3(EExecDllSetTls);
  1.1248 +	}
  1.1249 +
  1.1250 +__EXECDECL__ void Exec::DllFreeTls(TInt)
  1.1251 +	{
  1.1252 +	SLOW_EXEC1(EExecDllFreeTls);
  1.1253 +	}
  1.1254 +
  1.1255 +__EXECDECL__ TInt Exec::ThreadRename(TInt, const TDesC8&)
  1.1256 +	{
  1.1257 +	SLOW_EXEC2(EExecThreadRename);
  1.1258 +	}
  1.1259 +
  1.1260 +__EXECDECL__ TInt Exec::ProcessRename(TInt, const TDesC8&)
  1.1261 +	{
  1.1262 +	SLOW_EXEC2(EExecProcessRename);
  1.1263 +	}
  1.1264 +
  1.1265 +__EXECDECL__ void Exec::ProcessKill(TInt, TExitType, TInt, const TDesC8*)
  1.1266 +	{
  1.1267 +	SLOW_EXEC4(EExecProcessKill);
  1.1268 +	}
  1.1269 +
  1.1270 +__EXECDECL__ void Exec::ProcessLogon(TInt, TRequestStatus*, TBool)
  1.1271 +	{
  1.1272 +	SLOW_EXEC3(EExecProcessLogon);
  1.1273 +	}
  1.1274 +
  1.1275 +__EXECDECL__ TInt Exec::ProcessLogonCancel(TInt, TRequestStatus*, TBool)
  1.1276 +	{
  1.1277 +	SLOW_EXEC3(EExecProcessLogonCancel);
  1.1278 +	}
  1.1279 +
  1.1280 +__EXECDECL__ TInt Exec::ThreadProcess(TInt)
  1.1281 +	{
  1.1282 +	SLOW_EXEC1(EExecThreadProcess);
  1.1283 +	}
  1.1284 +
  1.1285 +__EXECDECL__ TInt Exec::ServerCreate(const TDesC8*, TInt)
  1.1286 +	{
  1.1287 +	SLOW_EXEC2(EExecServerCreate);
  1.1288 +	}
  1.1289 +
  1.1290 +__EXECDECL__ TInt Exec::ServerCreateWithOptions(const TDesC8*, TInt, TInt, TInt)
  1.1291 +	{
  1.1292 +	SLOW_EXEC4(EExecServerCreateWithOptions);
  1.1293 +	}
  1.1294 +
  1.1295 +__EXECDECL__ TInt Exec::SessionCreate(const TDesC8&, TInt, const TSecurityPolicy*, TInt)
  1.1296 +	{
  1.1297 +	SLOW_EXEC4(EExecSessionCreate);
  1.1298 +	}
  1.1299 +
  1.1300 +__EXECDECL__ TInt Exec::SessionCreateFromHandle(TInt, TInt, const TSecurityPolicy*, TInt)
  1.1301 +	{
  1.1302 +	SLOW_EXEC4(EExecSessionCreateFromHandle);
  1.1303 +	}
  1.1304 +
  1.1305 +EXPORT_C __EXECDECL__ TInt E32Loader::DeviceLoad(TAny*, TInt)
  1.1306 +	{
  1.1307 +	SLOW_EXEC2(EExecDeviceLoad);
  1.1308 +	}
  1.1309 +
  1.1310 +__EXECDECL__ TInt Exec::DeviceFree(const TDesC8&, TInt)
  1.1311 +	{
  1.1312 +	SLOW_EXEC2(EExecDeviceFree);
  1.1313 +	}
  1.1314 +
  1.1315 +__EXECDECL__ TInt Exec::ChannelCreate(const TDesC8&, TChannelCreateInfo8&, TInt)
  1.1316 +	{
  1.1317 +	SLOW_EXEC3(EExecChannelCreate);
  1.1318 +	}
  1.1319 +
  1.1320 +__EXECDECL__ TInt Exec::TimerCreate()
  1.1321 +	{
  1.1322 +	SLOW_EXEC0(EExecTimerCreate);
  1.1323 +	}
  1.1324 +
  1.1325 +__EXECDECL__ void Exec::TimerHighRes(TInt, TRequestStatus&, TInt)
  1.1326 +	{
  1.1327 +	SLOW_EXEC3(EExecTimerHighRes);
  1.1328 +	}
  1.1329 +
  1.1330 +__EXECDECL__ void Exec::AfterHighRes(TInt, TRequestStatus&)
  1.1331 +	{
  1.1332 +	SLOW_EXEC2(EExecAfterHighRes);
  1.1333 +	}
  1.1334 +
  1.1335 +__EXECDECL__ TInt Exec::ChangeNotifierCreate(TOwnerType)
  1.1336 +	{
  1.1337 +	SLOW_EXEC1(EExecChangeNotifierCreate);
  1.1338 +	}
  1.1339 +
  1.1340 +__EXECDECL__ TInt Exec::UndertakerCreate(TOwnerType)
  1.1341 +	{
  1.1342 +	SLOW_EXEC1(EExecUndertakerCreate);
  1.1343 +	}
  1.1344 +
  1.1345 +__EXECDECL__ TInt Exec::UndertakerLogon(TInt, TRequestStatus&, TInt&)
  1.1346 +	{
  1.1347 +	SLOW_EXEC3(EExecUndertakerLogon);
  1.1348 +	}
  1.1349 +
  1.1350 +__EXECDECL__ TInt Exec::UndertakerLogonCancel(TInt)
  1.1351 +	{
  1.1352 +	SLOW_EXEC1(EExecUndertakerLogonCancel);
  1.1353 +	}
  1.1354 +
  1.1355 +__EXECDECL__ void Exec::KernelHeapDebug(TInt, TInt, TAny*)
  1.1356 +	{
  1.1357 +	SLOW_EXEC3(EExecKernelHeapDebug);
  1.1358 +	}
  1.1359 +
  1.1360 +__EXECDECL__ TInt Exec::ThreadGetCpuTime(TInt, EXEC_INT64&)
  1.1361 +	{
  1.1362 +	SLOW_EXEC2(EExecThreadGetCpuTime);
  1.1363 +	}
  1.1364 +
  1.1365 +EXPORT_C __EXECDECL__ TInt E32Loader::CodeSegCreate(TCodeSegCreateInfo&)
  1.1366 +	{
  1.1367 +	SLOW_EXEC1(EExecCodeSegCreate);
  1.1368 +	}
  1.1369 +
  1.1370 +EXPORT_C __EXECDECL__ TInt E32Loader::CodeSegLoaded(TCodeSegCreateInfo&)
  1.1371 +	{
  1.1372 +	SLOW_EXEC1(EExecCodeSegLoaded);
  1.1373 +	}
  1.1374 +
  1.1375 +EXPORT_C __EXECDECL__ TInt E32Loader::LibraryCreate(TLibraryCreateInfo&)
  1.1376 +	{
  1.1377 +	SLOW_EXEC1(EExecLibraryCreate);
  1.1378 +	}
  1.1379 +
  1.1380 +EXPORT_C __EXECDECL__ TInt E32Loader::CodeSegOpen(TAny*, TInt)
  1.1381 +	{
  1.1382 +	SLOW_EXEC2(EExecCodeSegOpen);
  1.1383 +	}
  1.1384 +
  1.1385 +EXPORT_C __EXECDECL__ void E32Loader::CodeSegClose(TAny*)
  1.1386 +	{
  1.1387 +	SLOW_EXEC1(EExecCodeSegClose);
  1.1388 +	}
  1.1389 +
  1.1390 +EXPORT_C __EXECDECL__ void E32Loader::CodeSegNext(TAny*&, const TFindCodeSeg&)
  1.1391 +	{
  1.1392 +	SLOW_EXEC2(EExecCodeSegNext);
  1.1393 +	}
  1.1394 +
  1.1395 +EXPORT_C __EXECDECL__ void E32Loader::CodeSegInfo(TAny*, TCodeSegCreateInfo&)
  1.1396 +	{
  1.1397 +	SLOW_EXEC2(EExecCodeSegInfo);
  1.1398 +	}
  1.1399 +
  1.1400 +EXPORT_C __EXECDECL__ TInt E32Loader::CodeSegAddDependency(TAny*, TAny*)
  1.1401 +	{
  1.1402 +	SLOW_EXEC2(EExecCodeSegAddDependency);
  1.1403 +	}
  1.1404 +
  1.1405 +EXPORT_C __EXECDECL__ void E32Loader::CodeSegDeferDeletes()
  1.1406 +	{
  1.1407 +	SLOW_EXEC0(EExecCodeSegDeferDeletes);
  1.1408 +	}
  1.1409 +
  1.1410 +EXPORT_C __EXECDECL__ void E32Loader::CodeSegEndDeferDeletes()
  1.1411 +	{
  1.1412 +	SLOW_EXEC0(EExecCodeSegEndDeferDeletes);
  1.1413 +	}
  1.1414 +
  1.1415 +EXPORT_C __EXECDECL__ TInt E32Loader::ProcessCreate(TProcessCreateInfo&, const TDesC8*)
  1.1416 +	{
  1.1417 +	SLOW_EXEC2(EExecProcessCreate);
  1.1418 +	}
  1.1419 +
  1.1420 +EXPORT_C __EXECDECL__ TInt E32Loader::ProcessLoaded(TProcessCreateInfo&)
  1.1421 +	{
  1.1422 +	SLOW_EXEC1(EExecProcessLoaded);
  1.1423 +	}
  1.1424 +
  1.1425 +EXPORT_C __EXECDECL__ TInt E32Loader::CheckClientState(TInt)
  1.1426 +	{
  1.1427 +	SLOW_EXEC1(EExecCheckLoaderClientState);
  1.1428 +	}
  1.1429 +
  1.1430 +EXPORT_C __EXECDECL__ TAny* E32Loader::ThreadProcessCodeSeg(TInt)
  1.1431 +	{
  1.1432 +	SLOW_EXEC1(EExecThreadProcessCodeSeg);
  1.1433 +	}
  1.1434 +
  1.1435 +EXPORT_C __EXECDECL__ void E32Loader::ReadExportDir(TAny*, TLinAddr*)
  1.1436 +	{
  1.1437 +	SLOW_EXEC2(EExecCodeSegReadExportDir);
  1.1438 +	}
  1.1439 +
  1.1440 +__EXECDECL__ TInt E32Loader::WaitDllLock()
  1.1441 +	{
  1.1442 +	SLOW_EXEC0(EExecWaitDllLock);
  1.1443 +	}
  1.1444 +
  1.1445 +__EXECDECL__ TInt E32Loader::ReleaseDllLock()
  1.1446 +	{
  1.1447 +	SLOW_EXEC0(EExecReleaseDllLock);
  1.1448 +	}
  1.1449 +
  1.1450 +__EXECDECL__ TInt E32Loader::LibraryAttach(TInt, TInt&, TLinAddr*)
  1.1451 +	{
  1.1452 +	SLOW_EXEC3(EExecLibraryAttach);
  1.1453 +	}
  1.1454 +
  1.1455 +__EXECDECL__ TInt E32Loader::LibraryAttached(TInt)
  1.1456 +	{
  1.1457 +	SLOW_EXEC1(EExecLibraryAttached);
  1.1458 +	}
  1.1459 +
  1.1460 +__EXECDECL__ TInt E32Loader::StaticCallList(TInt& /*aEntryPointCount*/, TLinAddr* /*aUnused*/)
  1.1461 +	{
  1.1462 +	SLOW_EXEC2(EExecStaticCallList);
  1.1463 +	//SL: We hijack this function for initializing our process see User::InitProcess
  1.1464 +	//aEntryPointCount=0; //Tell the caller we don't have any DLL entry point
  1.1465 +	//gProcess.CreateHeap();
  1.1466 +	//return KErrNone;
  1.1467 +	}
  1.1468 +
  1.1469 +__EXECDECL__ TInt E32Loader::LibraryDetach(TInt&, TLinAddr*)
  1.1470 +	{
  1.1471 +	SLOW_EXEC2(EExecLibraryDetach);
  1.1472 +	}
  1.1473 +
  1.1474 +__EXECDECL__ TInt E32Loader::LibraryDetached()
  1.1475 +	{
  1.1476 +	SLOW_EXEC0(EExecLibraryDetached);
  1.1477 +	}
  1.1478 +
  1.1479 +__EXECDECL__ TInt Exec::LastThreadHandle()
  1.1480 +	{
  1.1481 +	SLOW_EXEC0(EExecLastThreadHandle);
  1.1482 +	//Not sure what to do with that returning 0 seams appropriate for now
  1.1483 +	//return 0;
  1.1484 +	}
  1.1485 +
  1.1486 +__EXECDECL__ void Exec::ThreadRendezvous(TInt)
  1.1487 +	{
  1.1488 +	SLOW_EXEC1(EExecThreadRendezvous);
  1.1489 +	}
  1.1490 +
  1.1491 +__EXECDECL__ void Exec::ProcessRendezvous(TInt)
  1.1492 +	{
  1.1493 +	SLOW_EXEC1(EExecProcessRendezvous);
  1.1494 +	}
  1.1495 +
  1.1496 +__EXECDECL__ TInt Exec::MessageGetDesLength(TInt, TInt)
  1.1497 +	{
  1.1498 +	SLOW_EXEC2(EExecMessageGetDesLength);
  1.1499 +	}
  1.1500 +
  1.1501 +__EXECDECL__ TInt Exec::MessageGetDesMaxLength(TInt, TInt)
  1.1502 +	{
  1.1503 +	SLOW_EXEC2(EExecMessageGetDesMaxLength);
  1.1504 +	}
  1.1505 +
  1.1506 +__EXECDECL__ TInt Exec::MessageClient(TInt, TOwnerType)
  1.1507 +	{
  1.1508 +	SLOW_EXEC2(EExecMessageClient);
  1.1509 +	}
  1.1510 +
  1.1511 +__EXECDECL__ TInt Exec::MessageSetProcessPriority(TInt, TProcessPriority)
  1.1512 +	{
  1.1513 +	SLOW_EXEC2(EExecMessageSetProcessPriority);
  1.1514 +	}
  1.1515 +
  1.1516 +__EXECDECL__ void Exec::MessageConstructFromPtr(TInt, TAny*)
  1.1517 +	{
  1.1518 +	SLOW_EXEC2(EExecMessageConstructFromPtr);
  1.1519 +	}
  1.1520 +
  1.1521 +__EXECDECL__ void Exec::MessageKill(TInt, TExitType, TInt, const TDesC8*)
  1.1522 +	{
  1.1523 +	SLOW_EXEC4(EExecMessageKill);
  1.1524 +	}
  1.1525 +
  1.1526 +__EXECDECL__ TInt Exec::MessageOpenObject(TInt, TObjectType, TInt, TOwnerType)
  1.1527 +	{
  1.1528 +	SLOW_EXEC4(EExecMessageOpenObject);
  1.1529 +	}
  1.1530 +
  1.1531 +__EXECDECL__ void Exec::ProcessSecurityInfo(TInt, SSecurityInfo&)
  1.1532 +	{
  1.1533 +	SLOW_EXEC2(EExecProcessSecurityInfo);
  1.1534 +	}
  1.1535 +
  1.1536 +__EXECDECL__ void Exec::ThreadSecurityInfo(TInt, SSecurityInfo&)
  1.1537 +	{
  1.1538 +	SLOW_EXEC2(EExecThreadSecurityInfo);
  1.1539 +	}
  1.1540 +
  1.1541 +__EXECDECL__ void Exec::MessageSecurityInfo(TInt, SSecurityInfo&)
  1.1542 +	{
  1.1543 +	SLOW_EXEC2(EExecMessageSecurityInfo);
  1.1544 +	}
  1.1545 +
  1.1546 +__EXECDECL__ void Exec::CreatorSecurityInfo(SSecurityInfo&)
  1.1547 +	{
  1.1548 +	SLOW_EXEC1(EExecCreatorSecurityInfo);
  1.1549 +	}
  1.1550 +
  1.1551 +__EXECDECL__ void Exec::DisabledCapabilities(SCapabilitySet&)
  1.1552 +	{
  1.1553 +	SLOW_EXEC1(EExecDisabledCapabilities);
  1.1554 +	}
  1.1555 +
  1.1556 +__EXECDECL__ TInt Exec::ChunkSetRestrictions(TInt, TUint)
  1.1557 +	{
  1.1558 +	SLOW_EXEC2(EExecChunkSetRestrictions);
  1.1559 +	}
  1.1560 +
  1.1561 +__EXECDECL__ TInt Exec::MsgQueueCreate(const TDesC8*, TInt, TInt, TOwnerType)
  1.1562 +	{
  1.1563 +	SLOW_EXEC4(EExecMsgQueueCreate);
  1.1564 +	}
  1.1565 +
  1.1566 +__EXECDECL__ TInt Exec::MsgQueueSend(TInt, const TAny*, TInt)
  1.1567 +	{
  1.1568 +	SLOW_EXEC3(EExecMsgQueueSend);
  1.1569 +	}
  1.1570 +
  1.1571 +__EXECDECL__ TInt Exec::MsgQueueReceive(TInt, TAny*, TInt)
  1.1572 +	{
  1.1573 +	SLOW_EXEC3(EExecMsgQueueReceive);
  1.1574 +	}
  1.1575 +
  1.1576 +__EXECDECL__ void Exec::MsgQueueNotifySpaceAvailable(TInt, TRequestStatus&)
  1.1577 +	{
  1.1578 +	SLOW_EXEC2(EExecMsgQueueNotifySpaceAvailable);
  1.1579 +	}
  1.1580 +
  1.1581 +__EXECDECL__ void Exec::MsgQueueCancelSpaceAvailable(TInt)
  1.1582 +	{
  1.1583 +	SLOW_EXEC1(EExecMsgQueueCancelSpaceAvailable);
  1.1584 +	}
  1.1585 +
  1.1586 +__EXECDECL__ void Exec::MsgQueueNotifyDataAvailable(TInt, TRequestStatus&)
  1.1587 +	{
  1.1588 +	SLOW_EXEC2(EExecMsgQueueNotifyDataAvailable);
  1.1589 +	}
  1.1590 +
  1.1591 +__EXECDECL__ void Exec::MsgQueueCancelDataAvailable(TInt)
  1.1592 +	{
  1.1593 +	SLOW_EXEC1(EExecMsgQueueCancelDataAvailable);
  1.1594 +	}
  1.1595 +
  1.1596 +__EXECDECL__ TInt Exec::MsgQueueSize(TInt)
  1.1597 +	{
  1.1598 +	SLOW_EXEC1(EExecMsgQueueSize);
  1.1599 +	}
  1.1600 +
  1.1601 +__EXECDECL__ TInt Exec::PropertyDefine(TUint, TUint, TPropertyInfo*)
  1.1602 +	{
  1.1603 +	SLOW_EXEC3(EExecPropertyDefine);
  1.1604 +	}
  1.1605 +
  1.1606 +__EXECDECL__ TInt Exec::PropertyDelete(TUint, TUint)
  1.1607 +	{
  1.1608 +	SLOW_EXEC2(EExecPropertyDelete);
  1.1609 +	}
  1.1610 +
  1.1611 +__EXECDECL__ TInt Exec::PropertyAttach(TUint, TUint, TOwnerType)
  1.1612 +	{
  1.1613 +	SLOW_EXEC3(EExecPropertyAttach);
  1.1614 +	}
  1.1615 +
  1.1616 +__EXECDECL__ void Exec::PropertySubscribe(TInt, TRequestStatus*)
  1.1617 +	{
  1.1618 +	SLOW_EXEC2(EExecPropertySubscribe);
  1.1619 +	}
  1.1620 +
  1.1621 +__EXECDECL__ void Exec::PropertyCancel(TInt)
  1.1622 +	{
  1.1623 +	SLOW_EXEC1(EExecPropertyCancel);
  1.1624 +	}
  1.1625 +
  1.1626 +__EXECDECL__ TInt Exec::PropertyGetI(TInt, TInt*)
  1.1627 +	{
  1.1628 +	SLOW_EXEC2(EExecPropertyGetI);
  1.1629 +	}
  1.1630 +
  1.1631 +__EXECDECL__ TInt Exec::PropertyGetB(TInt, TUint8*, TInt)
  1.1632 +	{
  1.1633 +	SLOW_EXEC3(EExecPropertyGetB);
  1.1634 +	}
  1.1635 +
  1.1636 +__EXECDECL__ TInt Exec::PropertySetI(TInt, TInt)
  1.1637 +	{
  1.1638 +	SLOW_EXEC2(EExecPropertySetI);
  1.1639 +	}
  1.1640 +
  1.1641 +__EXECDECL__ TInt Exec::PropertySetB(TInt, const TUint8*, TInt)
  1.1642 +	{
  1.1643 +	SLOW_EXEC3(EExecPropertySetB);
  1.1644 +	}
  1.1645 +
  1.1646 +__EXECDECL__ TInt Exec::PropertyFindGetI(TUint, TUint, TInt*)
  1.1647 +	{
  1.1648 +	SLOW_EXEC3(EExecPropertyFindGetI);
  1.1649 +	}
  1.1650 +
  1.1651 +__EXECDECL__ TInt Exec::PropertyFindGetB(TUint, TUint, TUint8*, TInt)
  1.1652 +	{
  1.1653 +	SLOW_EXEC4(EExecPropertyFindGetB);
  1.1654 +	}
  1.1655 +
  1.1656 +__EXECDECL__ TInt Exec::PropertyFindSetI(TUint, TUint, TInt)
  1.1657 +	{
  1.1658 +	SLOW_EXEC3(EExecPropertyFindSetI);
  1.1659 +	}
  1.1660 +
  1.1661 +__EXECDECL__ TInt Exec::PropertyFindSetB(TUint, TUint, TUint8*, TInt)
  1.1662 +	{
  1.1663 +	SLOW_EXEC4(EExecPropertyFindSetB);
  1.1664 +	}
  1.1665 +
  1.1666 +__EXECDECL__ TInt Exec::PowerEnableWakeupEvents(TPowerState)
  1.1667 +	{
  1.1668 +	SLOW_EXEC1(EExecPowerEnableWakeupEvents);
  1.1669 +	}
  1.1670 +
  1.1671 +__EXECDECL__ void Exec::PowerDisableWakeupEvents()
  1.1672 +	{
  1.1673 +	SLOW_EXEC0(EExecPowerDisableWakeupEvents);
  1.1674 +	}
  1.1675 +
  1.1676 +__EXECDECL__ void Exec::PowerRequestWakeupEventNotification(TRequestStatus*)
  1.1677 +	{
  1.1678 +	SLOW_EXEC1(EExecPowerRequestWakeupEventNotification);
  1.1679 +	}
  1.1680 +
  1.1681 +__EXECDECL__ void Exec::PowerCancelWakeupEventNotification()
  1.1682 +	{
  1.1683 +	SLOW_EXEC0(EExecPowerCancelWakeupEventNotification);
  1.1684 +	}
  1.1685 +
  1.1686 +__EXECDECL__ TInt Exec::PowerDown()
  1.1687 +	{
  1.1688 +	SLOW_EXEC0(EExecPowerDown);
  1.1689 +	}
  1.1690 +
  1.1691 +__EXECDECL__ TInt Exec::ProcessSetHandleParameter(TInt, TInt, TInt)
  1.1692 +	{
  1.1693 +	SLOW_EXEC3(EExecProcessSetHandleParameter);
  1.1694 +	}
  1.1695 +
  1.1696 +__EXECDECL__ TInt Exec::ProcessSetDataParameter(TInt, TInt, const TUint8*, TInt)
  1.1697 +	{
  1.1698 +	SLOW_EXEC4(EExecProcessSetDataParameter);
  1.1699 +	}
  1.1700 +
  1.1701 +__EXECDECL__ TInt Exec::ProcessGetHandleParameter(TInt, TObjectType, TOwnerType)
  1.1702 +	{
  1.1703 +	SLOW_EXEC3(EExecProcessGetHandleParameter);
  1.1704 +	}
  1.1705 +
  1.1706 +__EXECDECL__ TInt Exec::ProcessGetDataParameter(TInt, TUint8*, TInt)
  1.1707 +	{
  1.1708 +	SLOW_EXEC3(EExecProcessGetDataParameter);
  1.1709 +	}
  1.1710 +
  1.1711 +__EXECDECL__ TInt Exec::ProcessDataParameterLength(TInt)
  1.1712 +	{
  1.1713 +	SLOW_EXEC1(EExecProcessDataParameterLength);
  1.1714 +	}
  1.1715 +
  1.1716 +__EXECDECL__ TUint Exec::MessageClientProcessFlags(TInt)
  1.1717 +	{
  1.1718 +	SLOW_EXEC1(EExecMessageClientProcessFlags);
  1.1719 +	}
  1.1720 +
  1.1721 +__EXECDECL__ TInt Exec::ThreadStackInfo(TInt, TThreadStackInfo&)
  1.1722 +	{
  1.1723 +	SLOW_EXEC2(EExecThreadStackInfo);
  1.1724 +	}
  1.1725 +
  1.1726 +__EXECDECL__ RAllocator* Exec::ThreadGetHeap(TInt)
  1.1727 +	{
  1.1728 +	SLOW_EXEC1(EExecThreadGetHeap);
  1.1729 +	}
  1.1730 +
  1.1731 +__EXECDECL__ TInt Exec::ThreadAsProcess(TInt, TInt)
  1.1732 +	{
  1.1733 +	SLOW_EXEC2(EExecThreadAsProcess);
  1.1734 +	}
  1.1735 +
  1.1736 +__EXECDECL__ TInt Exec::CondVarCreate(const TDesC8*, TOwnerType)
  1.1737 +	{
  1.1738 +	SLOW_EXEC2(EExecCondVarCreate);
  1.1739 +	}
  1.1740 +
  1.1741 +__EXECDECL__ TInt Exec::CondVarWait(TInt, TInt, TInt)
  1.1742 +	{
  1.1743 +	SLOW_EXEC3(EExecCondVarWait);
  1.1744 +	}
  1.1745 +
  1.1746 +__EXECDECL__ void Exec::CondVarSignal(TInt)
  1.1747 +	{
  1.1748 +	SLOW_EXEC1(EExecCondVarSignal);
  1.1749 +	}
  1.1750 +
  1.1751 +__EXECDECL__ void Exec::CondVarBroadcast(TInt)
  1.1752 +	{
  1.1753 +	SLOW_EXEC1(EExecCondVarBroadcast);
  1.1754 +	}
  1.1755 +
  1.1756 +__EXECDECL__ TInt Exec::PlatSecDiagnostic(TPlatSecDiagnostic*)
  1.1757 +	{
  1.1758 +	SLOW_EXEC1(EExecPlatSecDiagnostic);
  1.1759 +	}
  1.1760 +
  1.1761 +__EXECDECL__ TLinAddr Exec::ExceptionDescriptor(TLinAddr)
  1.1762 +	{
  1.1763 +	SLOW_EXEC1(EExecExceptionDescriptor);
  1.1764 +	}
  1.1765 +
  1.1766 +__EXECDECL__ void Exec::ThreadRequestSignal(TInt)
  1.1767 +	{
  1.1768 +	SLOW_EXEC1(EExecThreadRequestSignal);
  1.1769 +	//TODO: look our thread per handle
  1.1770 +	//gProcess.iThread.iRequestSemaphore.Signal();
  1.1771 +	}
  1.1772 +
  1.1773 +__EXECDECL__ TBool Exec::MutexIsHeld(TInt)
  1.1774 +	{
  1.1775 +	SLOW_EXEC1(EExecMutexIsHeld);
  1.1776 +	}
  1.1777 +
  1.1778 +__EXECDECL__ TTrapHandler* Exec::LeaveStart()
  1.1779 +	{
  1.1780 +	SLOW_EXEC0(EExecLeaveStart);
  1.1781 +	//return gProcess.iThread.iHandler;
  1.1782 +	}
  1.1783 +
  1.1784 +__EXECDECL__ void Exec::LeaveEnd()
  1.1785 +	{
  1.1786 +	SLOW_EXEC0(EExecLeaveEnd);	
  1.1787 +	}
  1.1788 +
  1.1789 +__EXECDECL__ void Exec::SetDebugMaskIndex(TUint32, TUint)
  1.1790 +	{
  1.1791 +	SLOW_EXEC2(EExecSetDebugMaskIndex);
  1.1792 +	}
  1.1793 +
  1.1794 +__EXECDECL__ TInt Exec::GetModuleNameFromAddress(TAny*, TDes8&)
  1.1795 +	{
  1.1796 +	SLOW_EXEC2(EExecGetModuleNameFromAddress);
  1.1797 +	}
  1.1798 +
  1.1799 +__EXECDECL__ void Exec::NotifyChanges(TUint)
  1.1800 +	{
  1.1801 +	SLOW_EXEC1(EExecNotifyChanges);
  1.1802 +	}
  1.1803 +
  1.1804 +__EXECDECL__ TInt Exec::SetGlobalUserData(TInt, TInt)
  1.1805 +	{
  1.1806 +	SLOW_EXEC2(EExecSetGlobalUserData);
  1.1807 +	}
  1.1808 +
  1.1809 +__EXECDECL__ TInt Exec::SessionSecurityInfo(TInt, SSecurityInfo&)
  1.1810 +	{
  1.1811 +	SLOW_EXEC2(EExecSessionSecurityInfo);
  1.1812 +	}
  1.1813 +
  1.1814 +__EXECDECL__ const TRequestStatus* Exec::MessageClientStatus(TInt)
  1.1815 +	{
  1.1816 +	SLOW_EXEC1(EExecMessageClientStatus);
  1.1817 +	}
  1.1818 +
  1.1819 +__EXECDECL__ TInt Exec::SetFloatingPointMode(TFloatingPointMode, TFloatingPointRoundingMode)
  1.1820 +	{
  1.1821 +	SLOW_EXEC2(EExecSetFloatingPointMode);
  1.1822 +	}
  1.1823 +
  1.1824 +EXPORT_C __EXECDECL__ TBool BTrace::CheckFilter2(TUint32, TUint32)
  1.1825 +	{
  1.1826 +	SLOW_EXEC2(EExecCheckFilter2);
  1.1827 +	}
  1.1828 +
  1.1829 +__EXECDECL__ TAny* Exec::ProcessExeExportData()
  1.1830 +	{
  1.1831 +	SLOW_EXEC0(EExecProcessExeExportData);
  1.1832 +	}
  1.1833 +
  1.1834 +EXPORT_C __EXECDECL__ TInt E32Loader::NotifyIfCodeSegDestroyed(TRequestStatus&)
  1.1835 +	{
  1.1836 +	SLOW_EXEC1(EExecNotifyIfCodeSegDestroyed);
  1.1837 +	}
  1.1838 +
  1.1839 +EXPORT_C __EXECDECL__ TInt E32Loader::GetDestroyedCodeSegInfo(TCodeSegLoaderCookie&)
  1.1840 +	{
  1.1841 +	SLOW_EXEC1(EExecGetDestroyedCodeSegInfo);
  1.1842 +	}
  1.1843 +
  1.1844 +EXPORT_C __EXECDECL__ TInt Exec::SetWin32RuntimeHook(TAny*)
  1.1845 +	{
  1.1846 +	SLOW_EXEC1(EExecSetWin32RuntimeHook);
  1.1847 +	}
  1.1848 +
  1.1849 +__EXECDECL__ TInt Exec::GetBTraceId(TInt)
  1.1850 +	{
  1.1851 +	SLOW_EXEC1(EExecGetBTraceId);
  1.1852 +	}
  1.1853 +
  1.1854 +__EXECDECL__ void Exec::NotifyOnIdle(TRequestStatus*)
  1.1855 +	{
  1.1856 +	SLOW_EXEC1(EExecNotifyOnIdle);
  1.1857 +	}
  1.1858 +
  1.1859 +__EXECDECL__ void Exec::CancelMiscNotifier(TRequestStatus*)
  1.1860 +	{
  1.1861 +	SLOW_EXEC1(EExecCancelMiscNotifier);
  1.1862 +	}
  1.1863 +
  1.1864 +__EXECDECL__ void Exec::NotifyObjectDestruction(TInt, TRequestStatus*)
  1.1865 +	{
  1.1866 +	SLOW_EXEC2(EExecNotifyObjectDestruction);
  1.1867 +	}
  1.1868 +
  1.1869 +__EXECDECL__ void Exec::RegisterTrustedChunk(TInt)
  1.1870 +	{
  1.1871 +	SLOW_EXEC1(EExecRegisterTrustedChunk);
  1.1872 +	}
  1.1873 +
  1.1874 +/*
  1.1875 +Notify the kernel a thread is exiting.
  1.1876 +
  1.1877 +@param Exit reason
  1.1878 +@return ETrue if this is the last thread in the process, EFalse otherwise.
  1.1879 +*/
  1.1880 +__EXECDECL__ TBool Exec::UserThreadExiting(TInt aReason)
  1.1881 +	{
  1.1882 +	SLOW_EXEC1(EExecUserThreadExiting);
  1.1883 +	//gProcess.Free();
  1.1884 +	//return ETrue; //No thread support ATM so we are always the last thread
  1.1885 +	}
  1.1886 +
  1.1887 +__EXECDECL__ TBool Exec::ChunkIsPaged(TInt)
  1.1888 +	{
  1.1889 +	SLOW_EXEC1(EExecChunkIsPaged);
  1.1890 +	}
  1.1891 +
  1.1892 +__EXECDECL__ TBool Exec::ProcessDefaultDataPaged(TInt)
  1.1893 +	{
  1.1894 +	SLOW_EXEC1(EExecProcessDefaultDataPaged);
  1.1895 +	}
  1.1896 +
  1.1897 +__EXECDECL__ TUint Exec::MessageClientThreadFlags(TInt)
  1.1898 +	{
  1.1899 +	SLOW_EXEC1(EExecMessageClientThreadFlags);
  1.1900 +	}
  1.1901 +
  1.1902 +__EXECDECL__ TInt Exec::ShPoolCreate(const TShPoolInfo&, TUint)
  1.1903 +	{
  1.1904 +	SLOW_EXEC2(EExecShPoolCreate);
  1.1905 +	}
  1.1906 +
  1.1907 +__EXECDECL__ TInt Exec::ShPoolAlloc(TInt, TUint, SShBufBaseAndSize&)
  1.1908 +	{
  1.1909 +	SLOW_EXEC3(EExecShPoolAlloc);
  1.1910 +	}
  1.1911 +
  1.1912 +__EXECDECL__ void Exec::ShPoolGetInfo(TInt, TShPoolInfo&)
  1.1913 +	{
  1.1914 +	SLOW_EXEC2(EExecShPoolGetInfo);
  1.1915 +	}
  1.1916 +
  1.1917 +__EXECDECL__ TUint Exec::ShPoolFreeCount(TInt)
  1.1918 +	{
  1.1919 +	SLOW_EXEC1(EExecShPoolFreeCount);
  1.1920 +	}
  1.1921 +
  1.1922 +__EXECDECL__ TInt Exec::ShPoolNotification(TInt, TShPoolNotifyType, TUint, TRequestStatus&)
  1.1923 +	{
  1.1924 +	SLOW_EXEC4(EExecShPoolNotification);
  1.1925 +	}
  1.1926 +
  1.1927 +__EXECDECL__ TInt Exec::ShPoolNotificationCancel(TInt, TShPoolNotifyType, TRequestStatus&)
  1.1928 +	{
  1.1929 +	SLOW_EXEC3(EExecShPoolNotificationCancel);
  1.1930 +	}
  1.1931 +
  1.1932 +__EXECDECL__ TInt Exec::ShPoolBufferWindow(TInt, TInt, TBool)
  1.1933 +	{
  1.1934 +	SLOW_EXEC3(EExecShPoolBufferWindow);
  1.1935 +	}
  1.1936 +
  1.1937 +__EXECDECL__ TInt Exec::ShBufMap(TInt, TBool, SShBufBaseAndSize&)
  1.1938 +	{
  1.1939 +	SLOW_EXEC3(EExecShBufMap);
  1.1940 +	}
  1.1941 +
  1.1942 +__EXECDECL__ TInt Exec::ShBufUnMap(TInt)
  1.1943 +	{
  1.1944 +	SLOW_EXEC1(EExecShBufUnMap);
  1.1945 +	}
  1.1946 +
  1.1947 +__EXECDECL__ TInt Exec::ShBufBaseAndSize(TInt, SShBufBaseAndSize&)
  1.1948 +	{
  1.1949 +	SLOW_EXEC2(EExecShBufBaseAndSize);
  1.1950 +	}
  1.1951 +
  1.1952 +
  1.1953 +
  1.1954 +#endif
  1.1955 +
  1.1956 +