os/kernelhwsrv/kernel/eka/euser/epoc/symc/uc_exec.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 1995-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 // e32\euser\epoc\win32\uc_exec.cpp
    15 // 
    16 //
    17 
    18 
    19 //#define __GEN_USER_EXEC_CODE__
    20 
    21 #include "../win32/uc_std.h"
    22 #include <e32svr.h>
    23 #include <emulator.h>
    24 
    25 //
    26 #include <stdlib.h>
    27 #include <stdio.h>
    28 
    29 /**
    30 Symbian compatibility executive panics
    31 */
    32 enum TSymcExecPanic
    33 	{
    34 	ESymcExecPanicNotSupported,
    35 	ESymcExecPanicHeapAlreadyExists,
    36 	ESymcExecPanicCreateHeapFailed,
    37 	ESymcExecPanicNotUsed
    38 	};
    39 
    40 void Panic(TInt aReason)
    41 	{
    42 	_LIT(KCategory,"SYMC-Exec");
    43 	User::Panic(KCategory,aReason);
    44 	}
    45 
    46 
    47 const TInt KTrapStackSize=256;
    48 
    49 /*
    50 TODO: should we use CObject?
    51 */
    52 class TThread
    53 	{
    54 public:
    55 	
    56 public:
    57 	RSemaphore iRequestSemaphore;
    58 	CActiveScheduler* iActiveScheduler; //Current active scheduler for this thread. Used.
    59 	TTrapHandler* iHandler; //This is our cleanup stack. Used.
    60 	//No idea why we need that trap stack
    61 	//TTrap* iTrapStack[KTrapStackSize];
    62 	//TInt iTrapCount;
    63 	};
    64 
    65 /*
    66 TODO: should we use CObject?
    67 Object used to store process globals for our pseudo kernel.
    68 That's typically going to be a singleton.
    69 */
    70 /*
    71 class TProcess
    72 	{
    73 public:
    74 	void CreateHeap();
    75 	void Free();
    76 
    77 public:
    78 	RHeap* iAllocator;
    79 	TAny* iBase;
    80 	TThread iThread; //Single thread for now
    81 	};
    82 
    83 
    84 void TProcess::CreateHeap()
    85 	{
    86 	//iThread.iTrapCount=0;
    87 	//Define the size of our heap
    88 	const TInt KHeapMaxSize=1024*1024*10; // 10 Mo for now
    89 	__ASSERT_ALWAYS(iAllocator==NULL && iBase==NULL,Panic(ESymcExecPanicHeapAlreadyExists));	
    90 	iBase=malloc(KHeapMaxSize);
    91 	__ASSERT_ALWAYS(iBase!=NULL,Panic(ESymcExecPanicCreateHeapFailed));	
    92 	//TODO: is there anyway we could use variable size heap?
    93 	iAllocator=UserHeap::FixedHeap(iBase,KHeapMaxSize);
    94 	__ASSERT_ALWAYS(iAllocator!=NULL,Panic(ESymcExecPanicCreateHeapFailed));	
    95 	}
    96 
    97 void TProcess::Free()
    98 	{
    99 	free(iBase);
   100 	}
   101 
   102 */
   103 
   104 //TProcess gProcess;
   105 
   106 
   107 
   108 //
   109 
   110 
   111 typedef TInt (__fastcall *TDispatcher)(TInt, TInt*);
   112 TInt __fastcall LazyDispatch(TInt aFunction, TInt* aArgs);
   113 
   114 #pragma data_seg(".data2")
   115 #ifdef __VC32__
   116 #pragma bss_seg(".data2")
   117 #endif
   118 static TDispatcher TheDispatcher = &LazyDispatch;
   119 #pragma data_seg()
   120 #ifdef __VC32__
   121 #pragma bss_seg()
   122 #endif
   123 
   124 TInt __fastcall LazyDispatch(TInt aFunction, TInt* aArgs)
   125 	{
   126 	//Panic(ESymcExecPanicNotSupported);
   127 	//
   128 	HINSTANCE kernel = GetModuleHandleA("ekern.exe");
   129 	if (kernel)
   130 		{
   131 		TDispatcher dispatcher = (TDispatcher)Emulator::GetProcAddress(kernel, (LPCSTR)1);
   132 		if (dispatcher)
   133 			{
   134 			TheDispatcher = dispatcher;
   135 			return dispatcher(aFunction, aArgs);
   136 			}
   137 		}
   138 	ExitProcess(101);
   139 	return 0;
   140 	}
   141 
   142 #include <u32exec.h>
   143 
   144 /******************************************************************************
   145  * Slow executive calls with preprocessing or extra arguments
   146  ******************************************************************************/
   147 
   148 __NAKED__ TInt Exec::SessionSend(TInt /*aHandle*/, TInt /*aFunction*/, TAny* /*aPtr*/, TRequestStatus* /*aStatus*/)
   149 //
   150 // Send a blind message to the server.
   151 //
   152 	{
   153 	__DISPATCH(EExecSessionSend|EXECUTIVE_SLOW)
   154 	}
   155 
   156 __NAKED__ TInt Exec::SessionSendSync(TInt /*aHandle*/, TInt /*aFunction*/, TAny* /*aPtr*/, TRequestStatus* /*aStatus*/)
   157 //
   158 // Send a blind message to the server using thread's dedicated message slot.
   159 //
   160 	{
   161 	__DISPATCH(EExecSessionSendSync|EXECUTIVE_SLOW)
   162 	}
   163 
   164 
   165 __NAKED__ TInt Exec::MessageIpcCopy(TInt /*aHandle*/, TInt /*aParam*/, SIpcCopyInfo& /*aInfo*/, TInt /*anOffset*/)
   166 //
   167 // Perform a descriptor-to-descriptor IPC copy
   168 //
   169 	{
   170 
   171 	__DISPATCH(EExecMessageIpcCopy|EXECUTIVE_SLOW)
   172 	}
   173 
   174 __NAKED__ TInt Exec::BTraceOut(TUint32 /*a0*/, TUint32 /*a1*/, const BTrace::SExecExtension& /*aExtension*/, TInt /*aDataSize*/)
   175 	{
   176 	__DISPATCH(EExecBTraceOut|EXECUTIVE_SLOW)
   177 	}
   178 
   179 __NAKED__ TInt Exec::BTraceOutBig(TUint32 /*a0*/, TUint32 /*a1*/, const BTrace::SExecExtension& /*aExtension*/, TInt /*aDataSize*/)
   180 	{
   181 	__DISPATCH(EExecBTraceOutBig|EXECUTIVE_SLOW)
   182 	}
   183 
   184 __NAKED__ TInt Exec::UTraceOut(TUint32 /*a0*/, TUint32 /*a1*/, const BTrace::SExecExtension& /*aExtension*/, TInt /*aDataSize*/)
   185 	{
   186 	__DISPATCH(EExecUTraceOut|EXECUTIVE_SLOW)
   187 	}
   188 
   189 EXPORT_C TBool BTrace::Out(TUint32 a0, TUint32 a1, TUint32 a2, TUint32 a3)
   190 	{
   191 	BTrace::SExecExtension ext;
   192 	ext.iA2 = a2;
   193 	ext.iA3 = a3;
   194 	ext.iPc = (&a0)[-1]; // return address on X86
   195 	return Exec::BTraceOut(a0,a1,ext,0);
   196 	}
   197 
   198 EXPORT_C TBool BTrace::OutX(TUint32 a0, TUint32 a1, TUint32 a2, TUint32 a3)
   199 	{
   200 	BTrace::SExecExtension ext;
   201 	ext.iA2 = a2;
   202 	ext.iA3 = a3;
   203 	ext.iPc = (&a0)[-1]; // return address on X86
   204 	return Exec::BTraceOut(a0,a1,ext,0);
   205 	}
   206 
   207 EXPORT_C TBool BTrace::OutN(TUint32 a0, TUint32 a1, TUint32 a2, const TAny* aData, TInt aDataSize)
   208 	{
   209 	BTrace::SExecExtension ext;
   210 	ext.iA2 = a2;
   211 	ext.iA3 = (TUint32)aData;
   212 	ext.iPc = (&a0)[-1]; // return address on X86
   213 	return Exec::BTraceOut(a0,a1,ext,aDataSize);
   214 	}
   215 
   216 EXPORT_C TBool BTrace::OutNX(TUint32 a0, TUint32 a1, TUint32 a2, const TAny* aData, TInt aDataSize)
   217 	{
   218 	BTrace::SExecExtension ext;
   219 	ext.iA2 = a2;
   220 	ext.iA3 = (TUint32)aData;
   221 	ext.iPc = (&a0)[-1]; // return address on X86
   222 	return Exec::BTraceOut(a0,a1,ext,aDataSize);
   223 	}
   224 
   225 EXPORT_C TBool BTrace::OutBig(TUint32 a0, TUint32 a1, const TAny* aData, TInt aDataSize)
   226 	{
   227 	BTrace::SExecExtension ext;
   228 	ext.iA2 = 0;
   229 	ext.iA3 = (TUint32)aData;
   230 	ext.iPc = (&a0)[-1]; // return address on X86
   231 
   232 	if((TUint)aDataSize>8u)
   233 		{
   234 		if((TUint)aDataSize>KMaxBTraceDataArray+4u)
   235 			return Exec::BTraceOutBig(a0,a1,ext,aDataSize);
   236 		a0 += 4;
   237 		aDataSize -= 4;
   238 		ext.iA2 = *((TUint32*&)aData)++;
   239 		ext.iA3 = (TUint32)aData;
   240 		return Exec::BTraceOut(a0,a1,ext,aDataSize);
   241 		}
   242 
   243 	if((TUint)aDataSize>4u)
   244 		ext.iA3 = ((TUint32*)aData)[1];
   245 	if(aDataSize)
   246 		ext.iA2 = ((TUint32*)aData)[0];
   247 	a0 += aDataSize;
   248 	aDataSize = 0;
   249 	return Exec::BTraceOut(a0,a1,ext,aDataSize);
   250 	}
   251 
   252 EXPORT_C TBool BTrace::OutFiltered(TUint32 a0, TUint32 a1, TUint32 a2, TUint32 a3)
   253 	{
   254 	BTrace::SExecExtension ext;
   255 	a0 |= EMissingRecord<<BTrace::EFlagsIndex*8; // overload meaning of this flag to indicate filtered trace
   256 	ext.iA2 = a2;
   257 	ext.iA3 = a3;
   258 	ext.iPc = (&a0)[-1]; // return address on X86
   259 	return Exec::BTraceOut(a0,a1,ext,0);
   260 	}
   261 
   262 EXPORT_C TBool BTrace::OutFilteredX(TUint32 a0, TUint32 a1, TUint32 a2, TUint32 a3)
   263 	{
   264 	BTrace::SExecExtension ext;
   265 	a0 |= EMissingRecord<<BTrace::EFlagsIndex*8; // overload meaning of this flag to indicate filtered trace
   266 	ext.iA2 = a2;
   267 	ext.iA3 = a3;
   268 	ext.iPc = (&a0)[-1]; // return address on X86
   269 	return Exec::BTraceOut(a0,a1,ext,0);
   270 	}
   271 
   272 EXPORT_C TBool BTrace::OutFilteredN(TUint32 a0, TUint32 a1, TUint32 a2, const TAny* aData, TInt aDataSize)
   273 	{
   274 	BTrace::SExecExtension ext;
   275 	a0 |= EMissingRecord<<BTrace::EFlagsIndex*8; // overload meaning of this flag to indicate filtered trace
   276 	ext.iA2 = a2;
   277 	ext.iA3 = (TUint32)aData;
   278 	ext.iPc = (&a0)[-1]; // return address on X86
   279 	return Exec::BTraceOut(a0,a1,ext,aDataSize);
   280 	}
   281 
   282 EXPORT_C TBool BTrace::OutFilteredNX(TUint32 a0, TUint32 a1, TUint32 a2, const TAny* aData, TInt aDataSize)
   283 	{
   284 	BTrace::SExecExtension ext;
   285 	a0 |= EMissingRecord<<BTrace::EFlagsIndex*8; // overload meaning of this flag to indicate filtered trace
   286 	ext.iA2 = a2;
   287 	ext.iA3 = (TUint32)aData;
   288 	ext.iPc = (&a0)[-1]; // return address on X86
   289 	return Exec::BTraceOut(a0,a1,ext,aDataSize);
   290 	}
   291 
   292 EXPORT_C TBool BTrace::OutFilteredBig(TUint32 a0, TUint32 a1, const TAny* aData, TInt aDataSize)
   293 	{
   294 	BTrace::SExecExtension ext;
   295 	a0 |= EMissingRecord<<BTrace::EFlagsIndex*8; // overload meaning of this flag to indicate filtered trace
   296 	ext.iA2 = 0;
   297 	ext.iA3 = (TUint32)aData;
   298 	ext.iPc = (&a0)[-1]; // return address on X86
   299 
   300 	if((TUint)aDataSize>8u)
   301 		{
   302 		if((TUint)aDataSize>KMaxBTraceDataArray+4u)
   303 			return Exec::BTraceOutBig(a0,a1,ext,aDataSize);
   304 		a0 += 4;
   305 		aDataSize -= 4;
   306 		ext.iA2 = *((TUint32*&)aData)++;
   307 		ext.iA3 = (TUint32)aData;
   308 		return Exec::BTraceOut(a0,a1,ext,aDataSize);
   309 		}
   310 
   311 	if((TUint)aDataSize>4u)
   312 		ext.iA3 = ((TUint32*)aData)[1];
   313 	if(aDataSize)
   314 		ext.iA2 = ((TUint32*)aData)[0];
   315 	a0 += aDataSize;
   316 	aDataSize = 0;
   317 	return Exec::BTraceOut(a0,a1,ext,aDataSize);
   318 	}
   319 
   320 EXPORT_C TBool BTrace::OutFilteredPcFormatBig(TUint32 aHeader, TUint32 aModuleUid, TUint32 aPc, TUint16 aFormatId, const TAny* aData, TInt aDataSize)
   321 	{
   322  	BTrace::SExecExtension ext;
   323 	aHeader |= EMissingRecord<<BTrace::EFlagsIndex*8; // overload meaning of this flag to indicate filtered trace
   324 	ext.iA2 = aFormatId;
   325 	ext.iA3 = (TUint32)aData;
   326 	ext.iPc = aPc;
   327 
   328 	if((TUint)aDataSize>KMaxBTraceDataArray)
   329 		return Exec::UTraceOut(aHeader,aModuleUid,ext,aDataSize);
   330 	aHeader += 4;
   331 	return Exec::BTraceOut(aHeader,aModuleUid,ext,aDataSize);
   332 	}
   333 
   334 
   335 /*
   336 void ExecRequestComplete(TInt aHandle, TRequestStatus*& aStatus, TInt aReason)
   337 	{
   338 	//TODO: look up our thread per handle
   339 	//
   340 	gProcess.iThread.iRequestSemaphore.Signal();   
   341 	}
   342 */
   343 
   344 __NAKED__ void ExecRequestComplete(TInt /*aHandle*/, TRequestStatus*& /*aStatus*/, TInt /*aReason*/)
   345 	{
   346 	_asm mov ecx, [esp+8]			// ecx = TRequestStatus**
   347 	_asm xor eax, eax				//
   348 	_asm lock xchg eax, [ecx]		// eax=TRequestStatus*, zero TRequestStatus*
   349 	_asm cmp eax, 0					//
   350 	_asm je ExecRequestComplete_ret
   351 	_asm mov ecx, [esp+12]			// ecx = aReason
   352 	_asm mov [eax], ecx				// store aReason in request status
   353 	__DISPATCH(EExecThreadRequestSignal|EXECUTIVE_SLOW)
   354 	_asm ExecRequestComplete_ret: ret
   355 	}
   356 
   357 
   358 
   359 EXPORT_C void RThread::RequestComplete(TRequestStatus*& aStatus, TInt aReason) const
   360 /**
   361 Signals this thread that an asynchronous request originating from this thread,
   362 is complete.
   363 
   364 The request is associated with the specified request status object supplied
   365 by this thread.
   366 
   367 Typically, the caller of this function is the service provider responsible
   368 for satisfying the request made by this thread.
   369 
   370 The request is completed with the completion code passed in aReason. This
   371 value is copied into this thread's request status, *aStatus, before signalling
   372 this thread's request semaphore.
   373 
   374 The meaning of the completion code is a matter of convention to be decided
   375 between the service provider and this thread.
   376 
   377 In a client-server situation, completion of a request takes place in the context
   378 of the server thread, but the pointer is interpreted in the address space
   379 of the client.
   380 
   381 It is often the case in client-server situations that the client and the server
   382 are in the same address space (i.e. the same process).
   383 
   384 Setting the pointer to the request status to NULL is a convenience, not all
   385 servers need it.
   386 
   387 @param aStatus A reference to a pointer to the request status originally
   388                supplied by this thread. This is a pointer into this thread's
   389                address space, which may be different to the thread currently
   390                executing (this code). On return, the pointer to the request
   391                status is set to NULL.
   392 
   393 @param aReason The completion code of this request.
   394 */
   395 	{
   396 	ExecRequestComplete(iHandle,aStatus,aReason);
   397 	//SL: just change the status not the flag. We do that to please the active scheduler
   398 	//That's apparently the expected behavior 
   399 	//aStatus->iStatus=aReason;
   400 	}
   401 
   402 
   403 
   404 /**
   405 Signal this threads request semaphore.
   406 
   407 This is similar to RThread::RequestComplete() except that no TRequestStatus object
   408 is modified.
   409 
   410 May only be used to signal a thread in the same process as the callers.
   411 
   412 @panic KERN-EXEC 46 if the thread is not in the same process as the callers
   413 */
   414 EXPORT_C void RThread::RequestSignal() const
   415 	{
   416 	Exec::ThreadRequestSignal(iHandle);
   417 	}
   418 
   419 
   420 
   421 void ExitCurrentThread(TExitType aType, TInt aReason, const TDesC8* aCategory)
   422 	{
   423 	Exec::ThreadKill(KCurrentThreadHandle, aType, aReason, aCategory);
   424 	}
   425 
   426 
   427 //
   428 #ifndef __GEN_USER_EXEC_CODE__
   429 
   430 
   431 
   432 __EXECDECL__ void Exec::WaitForAnyRequest()
   433 	{
   434 	FAST_EXEC0(EFastExecWaitForAnyRequest);
   435 	//gProcess.iThread.iRequestSemaphore.Wait();
   436 	}
   437 
   438 __EXECDECL__ RAllocator* Exec::Heap()
   439 	{	
   440 	FAST_EXEC0(EFastExecHeap);
   441 	//return gProcess.iAllocator;
   442 	}
   443 
   444 __EXECDECL__ RAllocator* Exec::HeapSwitch(RAllocator*)
   445 	{
   446 	FAST_EXEC1(EFastExecHeapSwitch);
   447 	}
   448 
   449 __EXECDECL__ TTrapHandler* Exec::PushTrapFrame(TTrap* aTrap)
   450 	{
   451 	//Panic(ESymcExecPanicNotUsed);
   452 	//return NULL;
   453 	FAST_EXEC1(EFastExecPushTrapFrame);
   454 	//ASSERT(gProcess.iThread.iTrapCount<=KTrapStackSize);
   455 	//gProcess.iThread.iTrapStack[gProcess.iThread.iTrapCount++]=aTrap;
   456 	//return gProcess.iThread.iHandler;
   457 	}
   458 
   459 __EXECDECL__ TTrap* Exec::PopTrapFrame()
   460 	{
   461 	//Panic(ESymcExecPanicNotUsed);
   462 	//return NULL;
   463 	FAST_EXEC0(EFastExecPopTrapFrame);
   464 	//ASSERT(gProcess.iThread.iTrapCount>0);
   465 	//return gProcess.iThread.iTrapStack[gProcess.iThread.iTrapCount--];
   466 	}
   467 
   468 __EXECDECL__ CActiveScheduler* Exec::ActiveScheduler()
   469 	{
   470 	FAST_EXEC0(EFastExecActiveScheduler);
   471 	//return gProcess.iThread.iActiveScheduler;
   472 	}
   473 
   474 __EXECDECL__ void Exec::SetActiveScheduler(CActiveScheduler* aActiveScheduler)
   475 	{
   476 	FAST_EXEC1(EFastExecSetActiveScheduler);
   477 	//gProcess.iThread.iActiveScheduler=aActiveScheduler;
   478 	}
   479 
   480 __EXECDECL__ TTimerLockSpec Exec::LockPeriod()
   481 	{
   482 	FAST_EXEC0(EFastExecLockPeriod);
   483 	}
   484 
   485 __EXECDECL__ TTrapHandler* Exec::TrapHandler()
   486 	{
   487 	FAST_EXEC0(EFastExecTrapHandler);
   488 	//return gProcess.iThread.iHandler;
   489 	}
   490 
   491 __EXECDECL__ TTrapHandler* Exec::SetTrapHandler(TTrapHandler* aHandler)
   492 	{	
   493 	FAST_EXEC1(EFastExecSetTrapHandler);
   494 	//TTrapHandler* prev=gProcess.iThread.iHandler;
   495 	//gProcess.iThread.iHandler=aHandler;
   496 	//return prev;
   497 	}
   498 
   499 __EXECDECL__ TUint32 Exec::DebugMask()
   500 	{
   501 	FAST_EXEC0(EFastExecDebugMask);
   502 	}
   503 
   504 __EXECDECL__ TUint32 Exec::DebugMaskIndex(TUint)
   505 	{
   506 	FAST_EXEC1(EFastExecDebugMaskIndex);
   507 	}
   508 
   509 __EXECDECL__ void Exec::SetDebugMask(TUint32)
   510 	{
   511 	FAST_EXEC1(EFastExecSetDebugMask);
   512 	}
   513 
   514 __EXECDECL__ TUint32 Exec::FastCounter()
   515 	{
   516 	FAST_EXEC0(EFastExecFastCounter);
   517 	}
   518 
   519 __EXECDECL__ TUint32 Exec::NTickCount()
   520 	{
   521 	FAST_EXEC0(EFastExecNTickCount);
   522 	}
   523 
   524 EXPORT_C __EXECDECL__ void UserSvr::LockRamDrive()
   525 	{
   526 	FAST_EXEC0(EFastExecLockRamDrive);
   527 	}
   528 
   529 EXPORT_C __EXECDECL__ void UserSvr::UnlockRamDrive()
   530 	{
   531 	FAST_EXEC0(EFastExecUnlockRamDrive);
   532 	}
   533 
   534 EXPORT_C __EXECDECL__ TLinAddr UserSvr::RomHeaderAddress()
   535 	{
   536 	FAST_EXEC0(EFastExecRomHeaderAddress);
   537 	}
   538 
   539 EXPORT_C __EXECDECL__ TLinAddr UserSvr::RomRootDirectoryAddress()
   540 	{
   541 	FAST_EXEC0(EFastExecRomRootDirectoryAddress);
   542 	}
   543 
   544 __EXECDECL__ void Exec::SetReentryPoint(TLinAddr)
   545 	{
   546 	FAST_EXEC1(EFastExecSetReentryPoint);
   547 	}
   548 
   549 __EXECDECL__ TUint32 Exec::KernelConfigFlags()
   550 	{
   551 	FAST_EXEC0(EFastExecKernelConfigFlags);
   552 	}
   553 
   554 __EXECDECL__ TInt Exec::UTCOffset()
   555 	{
   556 	FAST_EXEC0(EFastExecUTCOffset);
   557 	}
   558 
   559 __EXECDECL__ TInt Exec::GetGlobalUserData(TInt)
   560 	{
   561 	FAST_EXEC1(EFastExecGetGlobalUserData);
   562 	}
   563 
   564 EXPORT_C __EXECDECL__ TBool BTrace::CheckFilter(TUint32)
   565 	{
   566 	FAST_EXEC1(EFastExecCheckFilter);
   567 	}
   568 
   569 __EXECDECL__ TInt Exec::ObjectNext(TObjectType, TBuf8<KMaxFullName>&, TFindHandle&)
   570 	{
   571 	SLOW_EXEC3(EExecObjectNext);
   572 	}
   573 
   574 __EXECDECL__ TUint8* Exec::ChunkBase(TInt)
   575 	{
   576 	SLOW_EXEC1(EExecChunkBase);
   577 	}
   578 
   579 __EXECDECL__ TInt Exec::ChunkSize(TInt)
   580 	{
   581 	SLOW_EXEC1(EExecChunkSize);
   582 	}
   583 
   584 __EXECDECL__ TInt Exec::ChunkMaxSize(TInt)
   585 	{
   586 	SLOW_EXEC1(EExecChunkMaxSize);
   587 	}
   588 
   589 __EXECDECL__ TUint Exec::HandleAttributes(TInt)
   590 	{
   591 	SLOW_EXEC1(EExecHandleAttributes);
   592 	}
   593 
   594 __EXECDECL__ TUint Exec::TickCount()
   595 	{
   596 	SLOW_EXEC0(EExecTickCount);
   597 	}
   598 
   599 __EXECDECL__ void Exec::LogicalDeviceGetCaps(TInt, TDes8&)
   600 	{
   601 	SLOW_EXEC2(EExecLogicalDeviceGetCaps);
   602 	}
   603 
   604 __EXECDECL__ TBool Exec::LogicalDeviceQueryVersionSupported(TInt, const TVersion&)
   605 	{
   606 	SLOW_EXEC2(EExecLogicalDeviceQueryVersionSupported);
   607 	}
   608 
   609 __EXECDECL__ TBool Exec::LogicalDeviceIsAvailable(TInt, TInt, const TDesC8*, const TDesC8*)
   610 	{
   611 	SLOW_EXEC4(EExecLogicalDeviceIsAvailable);
   612 	}
   613 
   614 EXPORT_C __EXECDECL__ TInt E32Loader::LocaleExports(TAny*, TLibraryFunction*)
   615 	{
   616 	SLOW_EXEC2(EExecLocaleExports);
   617 	}
   618 
   619 __EXECDECL__ TInt Exec::ChannelRequest(TInt, TInt, TAny*, TAny*)
   620 	{
   621 	SLOW_EXEC4(EExecChannelRequest);
   622 	}
   623 
   624 __EXECDECL__ TUint32 Exec::MathRandom()
   625 	{
   626 	SLOW_EXEC0(EExecMathRandom);
   627 	}
   628 
   629 __EXECDECL__ void Exec::IMB_Range(TAny*, TUint)
   630 	{
   631 	SLOW_EXEC2(EExecIMBRange);
   632 	}
   633 
   634 __EXECDECL__ TInt Exec::ResetMachine(TMachineStartupType)
   635 	{
   636 	SLOW_EXEC1(EExecResetMachine);
   637 	}
   638 
   639 __EXECDECL__ TLibraryFunction Exec::LibraryLookup(TInt, TInt)
   640 	{
   641 	SLOW_EXEC2(EExecLibraryLookup);
   642 	}
   643 
   644 __EXECDECL__ void Exec::LibraryFileName(TInt, TDes8&)
   645 	{
   646 	SLOW_EXEC2(EExecLibraryFileName);
   647 	}
   648 
   649 EXPORT_C __EXECDECL__ TInt UserSvr::ExecuteInSupervisorMode(TSupervisorFunction, TAny*)
   650 	{
   651 	SLOW_EXEC2(EExecExecuteInSupervisorMode);
   652 	}
   653 
   654 __EXECDECL__ void Exec::MutexWait(TInt)
   655 	{
   656 	SLOW_EXEC1(EExecMutexWait);
   657 	}
   658 
   659 __EXECDECL__ void Exec::MutexSignal(TInt)
   660 	{
   661 	SLOW_EXEC1(EExecMutexSignal);
   662 	}
   663 
   664 __EXECDECL__ TInt Exec::ProcessId(TInt)
   665 	{
   666 	SLOW_EXEC1(EExecProcessId);
   667 	}
   668 
   669 __EXECDECL__ void Exec::DllFileName(TInt, TDes8&)
   670 	{
   671 	SLOW_EXEC2(EExecDllFileName);
   672 	}
   673 
   674 __EXECDECL__ void Exec::ProcessResume(TInt)
   675 	{
   676 	SLOW_EXEC1(EExecProcessResume);
   677 	}
   678 
   679 __EXECDECL__ void Exec::ProcessFileName(TInt, TDes8&)
   680 	{
   681 	SLOW_EXEC2(EExecProcessFileName);
   682 	}
   683 
   684 __EXECDECL__ void Exec::ProcessCommandLine(TInt, TDes8&)
   685 	{
   686 	SLOW_EXEC2(EExecProcessCommandLine);
   687 	}
   688 
   689 __EXECDECL__ TExitType Exec::ProcessExitType(TInt)
   690 	{
   691 	SLOW_EXEC1(EExecProcessExitType);
   692 	}
   693 
   694 __EXECDECL__ TInt Exec::ProcessExitReason(TInt)
   695 	{
   696 	SLOW_EXEC1(EExecProcessExitReason);
   697 	}
   698 
   699 __EXECDECL__ void Exec::ProcessExitCategory(TInt, TDes8&)
   700 	{
   701 	SLOW_EXEC2(EExecProcessExitCategory);
   702 	}
   703 
   704 __EXECDECL__ TProcessPriority Exec::ProcessPriority(TInt)
   705 	{
   706 	SLOW_EXEC1(EExecProcessPriority);
   707 	}
   708 
   709 __EXECDECL__ TInt Exec::ProcessSetPriority(TInt, TProcessPriority)
   710 	{
   711 	SLOW_EXEC2(EExecProcessSetPriority);
   712 	}
   713 
   714 __EXECDECL__ TUint Exec::ProcessFlags(TInt)
   715 	{
   716 	SLOW_EXEC1(EExecProcessFlags);
   717 	}
   718 
   719 __EXECDECL__ void Exec::ProcessSetFlags(TInt, TUint, TUint)
   720 	{
   721 	SLOW_EXEC3(EExecProcessSetFlags);
   722 	}
   723 
   724 __EXECDECL__ TInt Exec::SemaphoreWait(TInt aHandle, TInt aTimeout)
   725 	{
   726 	SLOW_EXEC2(EExecSemaphoreWait);
   727 		/*
   728 #ifdef WIN32
   729       DWORD dwMilliseconds=INFINITE;
   730       if (aTimeout!=0) //0 means infinite apparently on symbian
   731          {
   732          //Timeout is not infinite convert it from micro to milliseconds
   733          dwMilliseconds=aTimeout/1000;
   734          }
   735 
   736       //Issues win32 wait
   737       WaitForSingleObject((HANDLE)aHandle,dwMilliseconds);
   738 #else
   739 #error "Platform not supported"
   740 #endif
   741    
   742       //Returned value is not even checked in RSemaphore::Wait
   743    return KErrNone; 
   744    */
   745 	}
   746 
   747 __EXECDECL__ void Exec::SemaphoreSignal1(TInt aHandle)
   748 	{
   749 /*
   750 #ifdef WIN32
   751    ReleaseSemaphore((HANDLE)aHandle,1,NULL);
   752 #else
   753 #error "Platform not supported"
   754 #endif
   755 */
   756 	SLOW_EXEC1(EExecSemaphoreSignal1);
   757 	}
   758 
   759 __EXECDECL__ void Exec::SemaphoreSignalN(TInt aHandle, TInt aCount)
   760 	{
   761 /*
   762 #ifdef WIN32
   763       ReleaseSemaphore((HANDLE)aHandle,aCount,NULL);
   764 #else
   765 #error "Platform not supported"
   766 #endif
   767 */
   768 	SLOW_EXEC2(EExecSemaphoreSignalN);
   769 	}
   770 
   771 __EXECDECL__ void Exec::ServerReceive(TInt, TRequestStatus&, TAny*)
   772 	{
   773 	SLOW_EXEC3(EExecServerReceive);
   774 	}
   775 
   776 __EXECDECL__ void Exec::ServerCancel(TInt)
   777 	{
   778 	SLOW_EXEC1(EExecServerCancel);
   779 	}
   780 
   781 __EXECDECL__ void Exec::SetSessionPtr(TInt, const TAny*)
   782 	{
   783 	SLOW_EXEC2(EExecSetSessionPtr);
   784 	}
   785 
   786 __EXECDECL__ TInt Exec::ThreadId(TInt)
   787 	{
   788 	SLOW_EXEC1(EExecThreadId);
   789 	}
   790 
   791 __EXECDECL__ TInt Exec::SessionShare(TInt&, TInt)
   792 	{
   793 	SLOW_EXEC2(EExecSessionShare);
   794 	}
   795 
   796 __EXECDECL__ void Exec::ThreadResume(TInt)
   797 	{
   798 	SLOW_EXEC1(EExecThreadResume);
   799 	}
   800 
   801 __EXECDECL__ void Exec::ThreadSuspend(TInt)
   802 	{
   803 	SLOW_EXEC1(EExecThreadSuspend);
   804 	}
   805 
   806 __EXECDECL__ TThreadPriority Exec::ThreadPriority(TInt)
   807 	{
   808 	SLOW_EXEC1(EExecThreadPriority);
   809 	}
   810 
   811 __EXECDECL__ void Exec::ThreadSetPriority(TInt, TThreadPriority)
   812 	{
   813 	SLOW_EXEC2(EExecThreadSetPriority);
   814 	}
   815 
   816 __EXECDECL__ TProcessPriority Exec::ThreadProcessPriority(TInt)
   817 	{
   818 	SLOW_EXEC1(EExecThreadProcessPriority);
   819 	}
   820 
   821 __EXECDECL__ void Exec::ThreadSetProcessPriority(TInt, TProcessPriority)
   822 	{
   823 	SLOW_EXEC2(EExecThreadSetProcessPriority);
   824 	}
   825 
   826 __EXECDECL__ TUint Exec::ThreadFlags(TInt)
   827 	{
   828 	SLOW_EXEC1(EExecThreadFlags);
   829 	}
   830 
   831 __EXECDECL__ void Exec::ThreadSetFlags(TInt, TUint, TUint)
   832 	{
   833 	SLOW_EXEC3(EExecThreadSetFlags);
   834 	}
   835 
   836 __EXECDECL__ TInt Exec::ThreadRequestCount(TInt)
   837 	{
   838 	SLOW_EXEC1(EExecThreadRequestCount);
   839 	}
   840 
   841 __EXECDECL__ TExitType Exec::ThreadExitType(TInt)
   842 	{
   843 	SLOW_EXEC1(EExecThreadExitType);
   844 	}
   845 
   846 __EXECDECL__ TInt Exec::ThreadExitReason(TInt)
   847 	{
   848 	SLOW_EXEC1(EExecThreadExitReason);
   849 	}
   850 
   851 __EXECDECL__ void Exec::ThreadExitCategory(TInt, TDes8&)
   852 	{
   853 	SLOW_EXEC2(EExecThreadExitCategory);
   854 	}
   855 
   856 __EXECDECL__ void Exec::TimerCancel(TInt)
   857 	{
   858 	SLOW_EXEC1(EExecTimerCancel);
   859 	}
   860 
   861 __EXECDECL__ void Exec::TimerAfter(TInt, TRequestStatus&, TInt)
   862 	{
   863 	SLOW_EXEC3(EExecTimerAfter);
   864 	}
   865 
   866 __EXECDECL__ void Exec::TimerAt(TInt, TRequestStatus&, TUint32, TUint32)
   867 	{
   868 	SLOW_EXEC4(EExecTimerAt);
   869 	}
   870 
   871 __EXECDECL__ void Exec::TimerLock(TInt, TRequestStatus&, TTimerLockSpec)
   872 	{
   873 	SLOW_EXEC3(EExecTimerLock);
   874 	}
   875 
   876 __EXECDECL__ TInt Exec::ChangeNotifierLogon(TInt, TRequestStatus&)
   877 	{
   878 	SLOW_EXEC2(EExecChangeNotifierLogon);
   879 	}
   880 
   881 __EXECDECL__ TInt Exec::ChangeNotifierLogoff(TInt)
   882 	{
   883 	SLOW_EXEC1(EExecChangeNotifierLogoff);
   884 	}
   885 
   886 __EXECDECL__ void Exec::RequestSignal(TInt)
   887 	{
   888 	SLOW_EXEC1(EExecRequestSignal);
   889 	}
   890 
   891 __EXECDECL__ void Exec::HandleName(TInt, TDes8&)
   892 	{
   893 	SLOW_EXEC2(EExecHandleName);
   894 	}
   895 
   896 __EXECDECL__ void Exec::HandleFullName(TInt, TDes8&)
   897 	{
   898 	SLOW_EXEC2(EExecHandleFullName);
   899 	}
   900 
   901 __EXECDECL__ void Exec::HandleInfo(TInt, THandleInfo*)
   902 	{
   903 	SLOW_EXEC2(EExecHandleInfo);
   904 	}
   905 
   906 __EXECDECL__ void Exec::HandleCount(TInt, TInt&, TInt&)
   907 	{
   908 	SLOW_EXEC3(EExecHandleCount);
   909 	}
   910 
   911 __EXECDECL__ void Exec::After(TInt, TRequestStatus&)
   912 	{
   913 	SLOW_EXEC2(EExecAfter);
   914 	}
   915 
   916 __EXECDECL__ void Exec::At(const EXEC_TIME&, TRequestStatus&)
   917 	{
   918 	SLOW_EXEC2(EExecAt);
   919 	}
   920 
   921 __EXECDECL__ void Exec::MessageComplete(TInt, TInt)
   922 	{
   923 	SLOW_EXEC2(EExecMessageComplete);
   924 	}
   925 
   926 __EXECDECL__ void Exec::MessageCompleteWithHandle(TInt, TInt)
   927 	{
   928 	SLOW_EXEC2(EExecMessageCompleteWithHandle);
   929 	}
   930 
   931 __EXECDECL__ void Exec::TransferSession(TInt, TInt)
   932 	{
   933 	SLOW_EXEC2(EExecTransferSession);
   934 	}
   935 
   936 __EXECDECL__ TInt Exec::TimeNow(EXEC_TIME&, TInt&)
   937 	{
   938 	SLOW_EXEC2(EExecTimeNow);
   939 	}
   940 
   941 __EXECDECL__ TInt Exec::TimeNowSecure(EXEC_TIME&, TInt&)
   942 	{
   943 	SLOW_EXEC2(EExecTimeNowSecure);
   944 	}
   945 
   946 __EXECDECL__ TInt Exec::SetUTCTimeAndOffset(const EXEC_TIME&, TInt, TUint, TUint)
   947 	{
   948 	SLOW_EXEC4(EExecSetUTCTimeAndOffset);
   949 	}
   950 
   951 __EXECDECL__ TInt Exec::SetMachineConfiguration(const TDesC8&)
   952 	{
   953 	SLOW_EXEC1(EExecSetMachineConfiguration);
   954 	}
   955 
   956 __EXECDECL__ void Exec::CaptureEventHook()
   957 	{
   958 	SLOW_EXEC0(EExecCaptureEventHook);
   959 	}
   960 
   961 __EXECDECL__ void Exec::ReleaseEventHook()
   962 	{
   963 	SLOW_EXEC0(EExecReleaseEventHook);
   964 	}
   965 
   966 __EXECDECL__ void Exec::RequestEvent(TRawEventBuf&, TRequestStatus&)
   967 	{
   968 	SLOW_EXEC2(EExecRequestEvent);
   969 	}
   970 
   971 __EXECDECL__ void Exec::RequestEventCancel()
   972 	{
   973 	SLOW_EXEC0(EExecRequestEventCancel);
   974 	}
   975 
   976 __EXECDECL__ TInt Exec::AddEvent(const TRawEvent&)
   977 	{
   978 	SLOW_EXEC1(EExecAddEvent);
   979 	}
   980 
   981 __EXECDECL__ TAny* Exec::DllTls(TInt aHandle, TInt aDllUid)
   982 	{
   983 	SLOW_EXEC2(EExecDllTls);
   984 	/*
   985 	if (aHandle==-1 && aDllUid==-1)
   986 		{
   987 		//No TGlobalDestructorFunc ATM
   988 		return NULL;
   989 		}
   990 	else
   991 		{
   992 		//No sure what to do here
   993 		__BREAKPOINT();
   994 		}
   995 	*/
   996 	}
   997 
   998 __EXECDECL__ TInt Exec::HalFunction(TInt, TInt, TAny*, TAny*)
   999 	{
  1000 	SLOW_EXEC4(EExecHalFunction);
  1001 	}
  1002 
  1003 __EXECDECL__ void Exec::WsRegisterThread()
  1004 	{
  1005 	SLOW_EXEC0(EExecWsRegisterThread);
  1006 	}
  1007 
  1008 __EXECDECL__ void Exec::FsRegisterThread()
  1009 	{
  1010 	SLOW_EXEC0(EExecFsRegisterThread);
  1011 	}
  1012 
  1013 __EXECDECL__ TInt Exec::ProcessCommandLineLength(TInt)
  1014 	{
  1015 	SLOW_EXEC1(EExecProcessCommandLineLength);
  1016 	}
  1017 
  1018 __EXECDECL__ void Exec::TimerInactivity(TInt, TRequestStatus&, TInt)
  1019 	{
  1020 	SLOW_EXEC3(EExecTimerInactivity);
  1021 	}
  1022 
  1023 __EXECDECL__ TInt Exec::UserInactivityTime()
  1024 	{
  1025 	SLOW_EXEC0(EExecUserInactivityTime);
  1026 	}
  1027 
  1028 __EXECDECL__ void Exec::ResetInactivityTime()
  1029 	{
  1030 	SLOW_EXEC0(EExecResetInactivityTime);
  1031 	}
  1032 
  1033 __EXECDECL__ void Exec::DebugPrint(TAny*, TInt)
  1034 	{
  1035 	SLOW_EXEC2(EExecDebugPrint);
  1036 	}
  1037 
  1038 __EXECDECL__ TInt Exec::BreakPoint()
  1039 	{
  1040 	SLOW_EXEC0(EExecBreakPoint);
  1041 	}
  1042 
  1043 __EXECDECL__ TInt Exec::ProfileStart(TInt)
  1044 	{
  1045 	SLOW_EXEC1(EExecProfileStart);
  1046 	}
  1047 
  1048 __EXECDECL__ TInt Exec::ProfileEnd(TInt)
  1049 	{
  1050 	SLOW_EXEC1(EExecProfileEnd);
  1051 	}
  1052 
  1053 __EXECDECL__ TExceptionHandler Exec::ExceptionHandler(TInt)
  1054 	{
  1055 	SLOW_EXEC1(EExecExceptionHandler);
  1056 	}
  1057 
  1058 __EXECDECL__ TInt Exec::SetExceptionHandler(TInt, TExceptionHandler, TUint32)
  1059 	{
  1060 	SLOW_EXEC3(EExecSetExceptionHandler);
  1061 	}
  1062 
  1063 __EXECDECL__ void Exec::ModifyExceptionMask(TInt, TUint32, TUint32)
  1064 	{
  1065 	SLOW_EXEC3(EExecModifyExceptionMask);
  1066 	}
  1067 
  1068 __EXECDECL__ TInt Exec::RaiseException(TInt, TExcType)
  1069 	{
  1070 	SLOW_EXEC2(EExecRaiseException);
  1071 	}
  1072 
  1073 __EXECDECL__ TInt Exec::IsExceptionHandled(TInt, TExcType, TBool)
  1074 	{
  1075 	SLOW_EXEC3(EExecIsExceptionHandled);
  1076 	}
  1077 
  1078 __EXECDECL__ TInt Exec::ProcessGetMemoryInfo(TInt, TModuleMemoryInfo&)
  1079 	{
  1080 	SLOW_EXEC2(EExecProcessGetMemoryInfo);
  1081 	}
  1082 
  1083 __EXECDECL__ TInt Exec::LibraryGetMemoryInfo(TInt, TModuleMemoryInfo&)
  1084 	{
  1085 	SLOW_EXEC2(EExecLibraryGetMemoryInfo);
  1086 	}
  1087 
  1088 __EXECDECL__ TInt Exec::MachineConfiguration(TDes8&, TInt&)
  1089 	{
  1090 	SLOW_EXEC2(EExecMachineConfiguration);
  1091 	}
  1092 
  1093 __EXECDECL__ TInt Exec::SetMemoryThresholds(TInt, TInt)
  1094 	{
  1095 	SLOW_EXEC2(EExecSetMemoryThresholds);
  1096 	}
  1097 
  1098 __EXECDECL__ void Exec::LibraryType(TInt, TUidType&)
  1099 	{
  1100 	SLOW_EXEC2(EExecLibraryType);
  1101 	}
  1102 
  1103 __EXECDECL__ void Exec::ProcessType(TInt, TUidType&)
  1104 	{
  1105 	SLOW_EXEC2(EExecProcessType);
  1106 	}
  1107 
  1108 __EXECDECL__ TInt Exec::ChunkBottom(TInt)
  1109 	{
  1110 	SLOW_EXEC1(EExecChunkBottom);
  1111 	}
  1112 
  1113 __EXECDECL__ TInt Exec::ChunkTop(TInt)
  1114 	{
  1115 	SLOW_EXEC1(EExecChunkTop);
  1116 	}
  1117 
  1118 __EXECDECL__ void Exec::ThreadContext(TInt, TDes8&)
  1119 	{
  1120 	SLOW_EXEC2(EExecThreadContext);
  1121 	}
  1122 
  1123 __EXECDECL__ TInt Exec::ThreadCreate(const TDesC8&, TOwnerType, SThreadCreateInfo8&)
  1124 	{
  1125 	SLOW_EXEC3(EExecThreadCreate);
  1126 	}
  1127 
  1128 __EXECDECL__ TInt Exec::FindHandleOpen(TOwnerType, const TFindHandle&)
  1129 	{
  1130 	SLOW_EXEC2(EExecFindHandleOpen);
  1131 	}
  1132 
  1133 __EXECDECL__ TInt Exec::HandleClose(TInt)
  1134 	{
  1135 	SLOW_EXEC1(EExecHandleClose);
  1136 	}
  1137 
  1138 __EXECDECL__ TInt Exec::ChunkCreate(TOwnerType, const TDesC8*, TChunkCreate&)
  1139 	{
  1140 	SLOW_EXEC3(EExecChunkCreate);
  1141 	}
  1142 
  1143 __EXECDECL__ TInt Exec::ChunkAdjust(TInt, TInt, TInt, TInt)
  1144 	{
  1145 	SLOW_EXEC4(EExecChunkAdjust);
  1146 	}
  1147 
  1148 __EXECDECL__ TInt Exec::OpenObject(TObjectType, const TDesC8&, TOwnerType)
  1149 	{
  1150 	SLOW_EXEC3(EExecOpenObject);
  1151 	}
  1152 
  1153 __EXECDECL__ TInt Exec::HandleDuplicate(TInt, TOwnerType, TInt&)
  1154 	{
  1155 	SLOW_EXEC3(EExecHandleDuplicate);
  1156 	}
  1157 
  1158 __EXECDECL__ TInt Exec::MutexCreate(const TDesC8*, TOwnerType)
  1159 	{
  1160 	SLOW_EXEC2(EExecMutexCreate);
  1161 	}
  1162 
  1163 __EXECDECL__ TInt Exec::SemaphoreCreate(const TDesC8* aName, TInt aCount, TOwnerType aType)
  1164 	{
  1165 	//__asm lea	edx, [esp + 0x4]
  1166 	//__asm mov	ecx, (EExecSemaphoreCreate)	
  1167 	//__asm jmp  [TheDispatcher]
  1168 
  1169 	SLOW_EXEC3(EExecSemaphoreCreate);
  1170 
  1171 	/*
  1172 #ifdef _WINDOWS
  1173 	HANDLE semaphore = CreateSemaphore( 
  1174 		NULL,								// default security attributes
  1175 		aCount,
  1176 		KMaxTInt,
  1177 		//TODO: use the name
  1178 		NULL);								// unnamed mutex
  1179 
  1180 	if (semaphore)
  1181 		{
  1182 		//success
  1183 		return (TInt)semaphore;
  1184 		}
  1185 
  1186 	//failure
  1187 	return NULL;
  1188 #else
  1189 	//TODO: pthread implementation
  1190 	Panic(ESymcExecPanicNotSupported);
  1191 #endif
  1192 	*/
  1193 	}
  1194 
  1195 __EXECDECL__ TInt Exec::ThreadOpenById(TUint, TOwnerType)
  1196 	{
  1197 	SLOW_EXEC2(EExecThreadOpenById);
  1198 	}
  1199 
  1200 __EXECDECL__ TInt Exec::ProcessOpenById(TUint, TOwnerType)
  1201 	{
  1202 	SLOW_EXEC2(EExecProcessOpenById);
  1203 	}
  1204 
  1205 __EXECDECL__ void Exec::ThreadKill(TInt aThreadHandle, TExitType aType, TInt aReason, const TDesC8* aCategory)
  1206 	{
  1207 	SLOW_EXEC4(EExecThreadKill);
  1208 /*
  1209 	if (aThreadHandle!=KCurrentThreadHandle)
  1210 		{
  1211 		//Not sure how to do that yet
  1212 		__BREAKPOINT();
  1213 		return;
  1214 		}
  1215 
  1216 	if (aType==EExitPanic)
  1217 		{
  1218 		//Display message
  1219 #ifdef _WINDOWS
  1220 		TBuf8<256> buf;
  1221 		buf.Copy(*aCategory);	
  1222 		char errstr[256]; sprintf(errstr, "Category: %s\nReason: %d",buf.PtrZ(),aReason);
  1223 		MessageBoxA(NULL,errstr, "PANIC", MB_OK | MB_ICONERROR);	
  1224 #endif
  1225 		__BREAKPOINT();
  1226 		}
  1227 	
  1228 	exit(aType);
  1229 */
  1230 	}
  1231 
  1232 __EXECDECL__ void Exec::ThreadLogon(TInt, TRequestStatus*, TBool)
  1233 	{
  1234 	SLOW_EXEC3(EExecThreadLogon);
  1235 	}
  1236 
  1237 __EXECDECL__ TInt Exec::ThreadLogonCancel(TInt, TRequestStatus*, TBool)
  1238 	{
  1239 	SLOW_EXEC3(EExecThreadLogonCancel);
  1240 	}
  1241 
  1242 __EXECDECL__ TInt Exec::DllSetTls(TInt, TInt, TAny*)
  1243 	{
  1244 	SLOW_EXEC3(EExecDllSetTls);
  1245 	}
  1246 
  1247 __EXECDECL__ void Exec::DllFreeTls(TInt)
  1248 	{
  1249 	SLOW_EXEC1(EExecDllFreeTls);
  1250 	}
  1251 
  1252 __EXECDECL__ TInt Exec::ThreadRename(TInt, const TDesC8&)
  1253 	{
  1254 	SLOW_EXEC2(EExecThreadRename);
  1255 	}
  1256 
  1257 __EXECDECL__ TInt Exec::ProcessRename(TInt, const TDesC8&)
  1258 	{
  1259 	SLOW_EXEC2(EExecProcessRename);
  1260 	}
  1261 
  1262 __EXECDECL__ void Exec::ProcessKill(TInt, TExitType, TInt, const TDesC8*)
  1263 	{
  1264 	SLOW_EXEC4(EExecProcessKill);
  1265 	}
  1266 
  1267 __EXECDECL__ void Exec::ProcessLogon(TInt, TRequestStatus*, TBool)
  1268 	{
  1269 	SLOW_EXEC3(EExecProcessLogon);
  1270 	}
  1271 
  1272 __EXECDECL__ TInt Exec::ProcessLogonCancel(TInt, TRequestStatus*, TBool)
  1273 	{
  1274 	SLOW_EXEC3(EExecProcessLogonCancel);
  1275 	}
  1276 
  1277 __EXECDECL__ TInt Exec::ThreadProcess(TInt)
  1278 	{
  1279 	SLOW_EXEC1(EExecThreadProcess);
  1280 	}
  1281 
  1282 __EXECDECL__ TInt Exec::ServerCreate(const TDesC8*, TInt)
  1283 	{
  1284 	SLOW_EXEC2(EExecServerCreate);
  1285 	}
  1286 
  1287 __EXECDECL__ TInt Exec::ServerCreateWithOptions(const TDesC8*, TInt, TInt, TInt)
  1288 	{
  1289 	SLOW_EXEC4(EExecServerCreateWithOptions);
  1290 	}
  1291 
  1292 __EXECDECL__ TInt Exec::SessionCreate(const TDesC8&, TInt, const TSecurityPolicy*, TInt)
  1293 	{
  1294 	SLOW_EXEC4(EExecSessionCreate);
  1295 	}
  1296 
  1297 __EXECDECL__ TInt Exec::SessionCreateFromHandle(TInt, TInt, const TSecurityPolicy*, TInt)
  1298 	{
  1299 	SLOW_EXEC4(EExecSessionCreateFromHandle);
  1300 	}
  1301 
  1302 EXPORT_C __EXECDECL__ TInt E32Loader::DeviceLoad(TAny*, TInt)
  1303 	{
  1304 	SLOW_EXEC2(EExecDeviceLoad);
  1305 	}
  1306 
  1307 __EXECDECL__ TInt Exec::DeviceFree(const TDesC8&, TInt)
  1308 	{
  1309 	SLOW_EXEC2(EExecDeviceFree);
  1310 	}
  1311 
  1312 __EXECDECL__ TInt Exec::ChannelCreate(const TDesC8&, TChannelCreateInfo8&, TInt)
  1313 	{
  1314 	SLOW_EXEC3(EExecChannelCreate);
  1315 	}
  1316 
  1317 __EXECDECL__ TInt Exec::TimerCreate()
  1318 	{
  1319 	SLOW_EXEC0(EExecTimerCreate);
  1320 	}
  1321 
  1322 __EXECDECL__ void Exec::TimerHighRes(TInt, TRequestStatus&, TInt)
  1323 	{
  1324 	SLOW_EXEC3(EExecTimerHighRes);
  1325 	}
  1326 
  1327 __EXECDECL__ void Exec::AfterHighRes(TInt, TRequestStatus&)
  1328 	{
  1329 	SLOW_EXEC2(EExecAfterHighRes);
  1330 	}
  1331 
  1332 __EXECDECL__ TInt Exec::ChangeNotifierCreate(TOwnerType)
  1333 	{
  1334 	SLOW_EXEC1(EExecChangeNotifierCreate);
  1335 	}
  1336 
  1337 __EXECDECL__ TInt Exec::UndertakerCreate(TOwnerType)
  1338 	{
  1339 	SLOW_EXEC1(EExecUndertakerCreate);
  1340 	}
  1341 
  1342 __EXECDECL__ TInt Exec::UndertakerLogon(TInt, TRequestStatus&, TInt&)
  1343 	{
  1344 	SLOW_EXEC3(EExecUndertakerLogon);
  1345 	}
  1346 
  1347 __EXECDECL__ TInt Exec::UndertakerLogonCancel(TInt)
  1348 	{
  1349 	SLOW_EXEC1(EExecUndertakerLogonCancel);
  1350 	}
  1351 
  1352 __EXECDECL__ void Exec::KernelHeapDebug(TInt, TInt, TAny*)
  1353 	{
  1354 	SLOW_EXEC3(EExecKernelHeapDebug);
  1355 	}
  1356 
  1357 __EXECDECL__ TInt Exec::ThreadGetCpuTime(TInt, EXEC_INT64&)
  1358 	{
  1359 	SLOW_EXEC2(EExecThreadGetCpuTime);
  1360 	}
  1361 
  1362 EXPORT_C __EXECDECL__ TInt E32Loader::CodeSegCreate(TCodeSegCreateInfo&)
  1363 	{
  1364 	SLOW_EXEC1(EExecCodeSegCreate);
  1365 	}
  1366 
  1367 EXPORT_C __EXECDECL__ TInt E32Loader::CodeSegLoaded(TCodeSegCreateInfo&)
  1368 	{
  1369 	SLOW_EXEC1(EExecCodeSegLoaded);
  1370 	}
  1371 
  1372 EXPORT_C __EXECDECL__ TInt E32Loader::LibraryCreate(TLibraryCreateInfo&)
  1373 	{
  1374 	SLOW_EXEC1(EExecLibraryCreate);
  1375 	}
  1376 
  1377 EXPORT_C __EXECDECL__ TInt E32Loader::CodeSegOpen(TAny*, TInt)
  1378 	{
  1379 	SLOW_EXEC2(EExecCodeSegOpen);
  1380 	}
  1381 
  1382 EXPORT_C __EXECDECL__ void E32Loader::CodeSegClose(TAny*)
  1383 	{
  1384 	SLOW_EXEC1(EExecCodeSegClose);
  1385 	}
  1386 
  1387 EXPORT_C __EXECDECL__ void E32Loader::CodeSegNext(TAny*&, const TFindCodeSeg&)
  1388 	{
  1389 	SLOW_EXEC2(EExecCodeSegNext);
  1390 	}
  1391 
  1392 EXPORT_C __EXECDECL__ void E32Loader::CodeSegInfo(TAny*, TCodeSegCreateInfo&)
  1393 	{
  1394 	SLOW_EXEC2(EExecCodeSegInfo);
  1395 	}
  1396 
  1397 EXPORT_C __EXECDECL__ TInt E32Loader::CodeSegAddDependency(TAny*, TAny*)
  1398 	{
  1399 	SLOW_EXEC2(EExecCodeSegAddDependency);
  1400 	}
  1401 
  1402 EXPORT_C __EXECDECL__ void E32Loader::CodeSegDeferDeletes()
  1403 	{
  1404 	SLOW_EXEC0(EExecCodeSegDeferDeletes);
  1405 	}
  1406 
  1407 EXPORT_C __EXECDECL__ void E32Loader::CodeSegEndDeferDeletes()
  1408 	{
  1409 	SLOW_EXEC0(EExecCodeSegEndDeferDeletes);
  1410 	}
  1411 
  1412 EXPORT_C __EXECDECL__ TInt E32Loader::ProcessCreate(TProcessCreateInfo&, const TDesC8*)
  1413 	{
  1414 	SLOW_EXEC2(EExecProcessCreate);
  1415 	}
  1416 
  1417 EXPORT_C __EXECDECL__ TInt E32Loader::ProcessLoaded(TProcessCreateInfo&)
  1418 	{
  1419 	SLOW_EXEC1(EExecProcessLoaded);
  1420 	}
  1421 
  1422 EXPORT_C __EXECDECL__ TInt E32Loader::CheckClientState(TInt)
  1423 	{
  1424 	SLOW_EXEC1(EExecCheckLoaderClientState);
  1425 	}
  1426 
  1427 EXPORT_C __EXECDECL__ TAny* E32Loader::ThreadProcessCodeSeg(TInt)
  1428 	{
  1429 	SLOW_EXEC1(EExecThreadProcessCodeSeg);
  1430 	}
  1431 
  1432 EXPORT_C __EXECDECL__ void E32Loader::ReadExportDir(TAny*, TLinAddr*)
  1433 	{
  1434 	SLOW_EXEC2(EExecCodeSegReadExportDir);
  1435 	}
  1436 
  1437 __EXECDECL__ TInt E32Loader::WaitDllLock()
  1438 	{
  1439 	SLOW_EXEC0(EExecWaitDllLock);
  1440 	}
  1441 
  1442 __EXECDECL__ TInt E32Loader::ReleaseDllLock()
  1443 	{
  1444 	SLOW_EXEC0(EExecReleaseDllLock);
  1445 	}
  1446 
  1447 __EXECDECL__ TInt E32Loader::LibraryAttach(TInt, TInt&, TLinAddr*)
  1448 	{
  1449 	SLOW_EXEC3(EExecLibraryAttach);
  1450 	}
  1451 
  1452 __EXECDECL__ TInt E32Loader::LibraryAttached(TInt)
  1453 	{
  1454 	SLOW_EXEC1(EExecLibraryAttached);
  1455 	}
  1456 
  1457 __EXECDECL__ TInt E32Loader::StaticCallList(TInt& /*aEntryPointCount*/, TLinAddr* /*aUnused*/)
  1458 	{
  1459 	SLOW_EXEC2(EExecStaticCallList);
  1460 	//SL: We hijack this function for initializing our process see User::InitProcess
  1461 	//aEntryPointCount=0; //Tell the caller we don't have any DLL entry point
  1462 	//gProcess.CreateHeap();
  1463 	//return KErrNone;
  1464 	}
  1465 
  1466 __EXECDECL__ TInt E32Loader::LibraryDetach(TInt&, TLinAddr*)
  1467 	{
  1468 	SLOW_EXEC2(EExecLibraryDetach);
  1469 	}
  1470 
  1471 __EXECDECL__ TInt E32Loader::LibraryDetached()
  1472 	{
  1473 	SLOW_EXEC0(EExecLibraryDetached);
  1474 	}
  1475 
  1476 __EXECDECL__ TInt Exec::LastThreadHandle()
  1477 	{
  1478 	SLOW_EXEC0(EExecLastThreadHandle);
  1479 	//Not sure what to do with that returning 0 seams appropriate for now
  1480 	//return 0;
  1481 	}
  1482 
  1483 __EXECDECL__ void Exec::ThreadRendezvous(TInt)
  1484 	{
  1485 	SLOW_EXEC1(EExecThreadRendezvous);
  1486 	}
  1487 
  1488 __EXECDECL__ void Exec::ProcessRendezvous(TInt)
  1489 	{
  1490 	SLOW_EXEC1(EExecProcessRendezvous);
  1491 	}
  1492 
  1493 __EXECDECL__ TInt Exec::MessageGetDesLength(TInt, TInt)
  1494 	{
  1495 	SLOW_EXEC2(EExecMessageGetDesLength);
  1496 	}
  1497 
  1498 __EXECDECL__ TInt Exec::MessageGetDesMaxLength(TInt, TInt)
  1499 	{
  1500 	SLOW_EXEC2(EExecMessageGetDesMaxLength);
  1501 	}
  1502 
  1503 __EXECDECL__ TInt Exec::MessageClient(TInt, TOwnerType)
  1504 	{
  1505 	SLOW_EXEC2(EExecMessageClient);
  1506 	}
  1507 
  1508 __EXECDECL__ TInt Exec::MessageSetProcessPriority(TInt, TProcessPriority)
  1509 	{
  1510 	SLOW_EXEC2(EExecMessageSetProcessPriority);
  1511 	}
  1512 
  1513 __EXECDECL__ void Exec::MessageConstructFromPtr(TInt, TAny*)
  1514 	{
  1515 	SLOW_EXEC2(EExecMessageConstructFromPtr);
  1516 	}
  1517 
  1518 __EXECDECL__ void Exec::MessageKill(TInt, TExitType, TInt, const TDesC8*)
  1519 	{
  1520 	SLOW_EXEC4(EExecMessageKill);
  1521 	}
  1522 
  1523 __EXECDECL__ TInt Exec::MessageOpenObject(TInt, TObjectType, TInt, TOwnerType)
  1524 	{
  1525 	SLOW_EXEC4(EExecMessageOpenObject);
  1526 	}
  1527 
  1528 __EXECDECL__ void Exec::ProcessSecurityInfo(TInt, SSecurityInfo&)
  1529 	{
  1530 	SLOW_EXEC2(EExecProcessSecurityInfo);
  1531 	}
  1532 
  1533 __EXECDECL__ void Exec::ThreadSecurityInfo(TInt, SSecurityInfo&)
  1534 	{
  1535 	SLOW_EXEC2(EExecThreadSecurityInfo);
  1536 	}
  1537 
  1538 __EXECDECL__ void Exec::MessageSecurityInfo(TInt, SSecurityInfo&)
  1539 	{
  1540 	SLOW_EXEC2(EExecMessageSecurityInfo);
  1541 	}
  1542 
  1543 __EXECDECL__ void Exec::CreatorSecurityInfo(SSecurityInfo&)
  1544 	{
  1545 	SLOW_EXEC1(EExecCreatorSecurityInfo);
  1546 	}
  1547 
  1548 __EXECDECL__ void Exec::DisabledCapabilities(SCapabilitySet&)
  1549 	{
  1550 	SLOW_EXEC1(EExecDisabledCapabilities);
  1551 	}
  1552 
  1553 __EXECDECL__ TInt Exec::ChunkSetRestrictions(TInt, TUint)
  1554 	{
  1555 	SLOW_EXEC2(EExecChunkSetRestrictions);
  1556 	}
  1557 
  1558 __EXECDECL__ TInt Exec::MsgQueueCreate(const TDesC8*, TInt, TInt, TOwnerType)
  1559 	{
  1560 	SLOW_EXEC4(EExecMsgQueueCreate);
  1561 	}
  1562 
  1563 __EXECDECL__ TInt Exec::MsgQueueSend(TInt, const TAny*, TInt)
  1564 	{
  1565 	SLOW_EXEC3(EExecMsgQueueSend);
  1566 	}
  1567 
  1568 __EXECDECL__ TInt Exec::MsgQueueReceive(TInt, TAny*, TInt)
  1569 	{
  1570 	SLOW_EXEC3(EExecMsgQueueReceive);
  1571 	}
  1572 
  1573 __EXECDECL__ void Exec::MsgQueueNotifySpaceAvailable(TInt, TRequestStatus&)
  1574 	{
  1575 	SLOW_EXEC2(EExecMsgQueueNotifySpaceAvailable);
  1576 	}
  1577 
  1578 __EXECDECL__ void Exec::MsgQueueCancelSpaceAvailable(TInt)
  1579 	{
  1580 	SLOW_EXEC1(EExecMsgQueueCancelSpaceAvailable);
  1581 	}
  1582 
  1583 __EXECDECL__ void Exec::MsgQueueNotifyDataAvailable(TInt, TRequestStatus&)
  1584 	{
  1585 	SLOW_EXEC2(EExecMsgQueueNotifyDataAvailable);
  1586 	}
  1587 
  1588 __EXECDECL__ void Exec::MsgQueueCancelDataAvailable(TInt)
  1589 	{
  1590 	SLOW_EXEC1(EExecMsgQueueCancelDataAvailable);
  1591 	}
  1592 
  1593 __EXECDECL__ TInt Exec::MsgQueueSize(TInt)
  1594 	{
  1595 	SLOW_EXEC1(EExecMsgQueueSize);
  1596 	}
  1597 
  1598 __EXECDECL__ TInt Exec::PropertyDefine(TUint, TUint, TPropertyInfo*)
  1599 	{
  1600 	SLOW_EXEC3(EExecPropertyDefine);
  1601 	}
  1602 
  1603 __EXECDECL__ TInt Exec::PropertyDelete(TUint, TUint)
  1604 	{
  1605 	SLOW_EXEC2(EExecPropertyDelete);
  1606 	}
  1607 
  1608 __EXECDECL__ TInt Exec::PropertyAttach(TUint, TUint, TOwnerType)
  1609 	{
  1610 	SLOW_EXEC3(EExecPropertyAttach);
  1611 	}
  1612 
  1613 __EXECDECL__ void Exec::PropertySubscribe(TInt, TRequestStatus*)
  1614 	{
  1615 	SLOW_EXEC2(EExecPropertySubscribe);
  1616 	}
  1617 
  1618 __EXECDECL__ void Exec::PropertyCancel(TInt)
  1619 	{
  1620 	SLOW_EXEC1(EExecPropertyCancel);
  1621 	}
  1622 
  1623 __EXECDECL__ TInt Exec::PropertyGetI(TInt, TInt*)
  1624 	{
  1625 	SLOW_EXEC2(EExecPropertyGetI);
  1626 	}
  1627 
  1628 __EXECDECL__ TInt Exec::PropertyGetB(TInt, TUint8*, TInt)
  1629 	{
  1630 	SLOW_EXEC3(EExecPropertyGetB);
  1631 	}
  1632 
  1633 __EXECDECL__ TInt Exec::PropertySetI(TInt, TInt)
  1634 	{
  1635 	SLOW_EXEC2(EExecPropertySetI);
  1636 	}
  1637 
  1638 __EXECDECL__ TInt Exec::PropertySetB(TInt, const TUint8*, TInt)
  1639 	{
  1640 	SLOW_EXEC3(EExecPropertySetB);
  1641 	}
  1642 
  1643 __EXECDECL__ TInt Exec::PropertyFindGetI(TUint, TUint, TInt*)
  1644 	{
  1645 	SLOW_EXEC3(EExecPropertyFindGetI);
  1646 	}
  1647 
  1648 __EXECDECL__ TInt Exec::PropertyFindGetB(TUint, TUint, TUint8*, TInt)
  1649 	{
  1650 	SLOW_EXEC4(EExecPropertyFindGetB);
  1651 	}
  1652 
  1653 __EXECDECL__ TInt Exec::PropertyFindSetI(TUint, TUint, TInt)
  1654 	{
  1655 	SLOW_EXEC3(EExecPropertyFindSetI);
  1656 	}
  1657 
  1658 __EXECDECL__ TInt Exec::PropertyFindSetB(TUint, TUint, TUint8*, TInt)
  1659 	{
  1660 	SLOW_EXEC4(EExecPropertyFindSetB);
  1661 	}
  1662 
  1663 __EXECDECL__ TInt Exec::PowerEnableWakeupEvents(TPowerState)
  1664 	{
  1665 	SLOW_EXEC1(EExecPowerEnableWakeupEvents);
  1666 	}
  1667 
  1668 __EXECDECL__ void Exec::PowerDisableWakeupEvents()
  1669 	{
  1670 	SLOW_EXEC0(EExecPowerDisableWakeupEvents);
  1671 	}
  1672 
  1673 __EXECDECL__ void Exec::PowerRequestWakeupEventNotification(TRequestStatus*)
  1674 	{
  1675 	SLOW_EXEC1(EExecPowerRequestWakeupEventNotification);
  1676 	}
  1677 
  1678 __EXECDECL__ void Exec::PowerCancelWakeupEventNotification()
  1679 	{
  1680 	SLOW_EXEC0(EExecPowerCancelWakeupEventNotification);
  1681 	}
  1682 
  1683 __EXECDECL__ TInt Exec::PowerDown()
  1684 	{
  1685 	SLOW_EXEC0(EExecPowerDown);
  1686 	}
  1687 
  1688 __EXECDECL__ TInt Exec::ProcessSetHandleParameter(TInt, TInt, TInt)
  1689 	{
  1690 	SLOW_EXEC3(EExecProcessSetHandleParameter);
  1691 	}
  1692 
  1693 __EXECDECL__ TInt Exec::ProcessSetDataParameter(TInt, TInt, const TUint8*, TInt)
  1694 	{
  1695 	SLOW_EXEC4(EExecProcessSetDataParameter);
  1696 	}
  1697 
  1698 __EXECDECL__ TInt Exec::ProcessGetHandleParameter(TInt, TObjectType, TOwnerType)
  1699 	{
  1700 	SLOW_EXEC3(EExecProcessGetHandleParameter);
  1701 	}
  1702 
  1703 __EXECDECL__ TInt Exec::ProcessGetDataParameter(TInt, TUint8*, TInt)
  1704 	{
  1705 	SLOW_EXEC3(EExecProcessGetDataParameter);
  1706 	}
  1707 
  1708 __EXECDECL__ TInt Exec::ProcessDataParameterLength(TInt)
  1709 	{
  1710 	SLOW_EXEC1(EExecProcessDataParameterLength);
  1711 	}
  1712 
  1713 __EXECDECL__ TUint Exec::MessageClientProcessFlags(TInt)
  1714 	{
  1715 	SLOW_EXEC1(EExecMessageClientProcessFlags);
  1716 	}
  1717 
  1718 __EXECDECL__ TInt Exec::ThreadStackInfo(TInt, TThreadStackInfo&)
  1719 	{
  1720 	SLOW_EXEC2(EExecThreadStackInfo);
  1721 	}
  1722 
  1723 __EXECDECL__ RAllocator* Exec::ThreadGetHeap(TInt)
  1724 	{
  1725 	SLOW_EXEC1(EExecThreadGetHeap);
  1726 	}
  1727 
  1728 __EXECDECL__ TInt Exec::ThreadAsProcess(TInt, TInt)
  1729 	{
  1730 	SLOW_EXEC2(EExecThreadAsProcess);
  1731 	}
  1732 
  1733 __EXECDECL__ TInt Exec::CondVarCreate(const TDesC8*, TOwnerType)
  1734 	{
  1735 	SLOW_EXEC2(EExecCondVarCreate);
  1736 	}
  1737 
  1738 __EXECDECL__ TInt Exec::CondVarWait(TInt, TInt, TInt)
  1739 	{
  1740 	SLOW_EXEC3(EExecCondVarWait);
  1741 	}
  1742 
  1743 __EXECDECL__ void Exec::CondVarSignal(TInt)
  1744 	{
  1745 	SLOW_EXEC1(EExecCondVarSignal);
  1746 	}
  1747 
  1748 __EXECDECL__ void Exec::CondVarBroadcast(TInt)
  1749 	{
  1750 	SLOW_EXEC1(EExecCondVarBroadcast);
  1751 	}
  1752 
  1753 __EXECDECL__ TInt Exec::PlatSecDiagnostic(TPlatSecDiagnostic*)
  1754 	{
  1755 	SLOW_EXEC1(EExecPlatSecDiagnostic);
  1756 	}
  1757 
  1758 __EXECDECL__ TLinAddr Exec::ExceptionDescriptor(TLinAddr)
  1759 	{
  1760 	SLOW_EXEC1(EExecExceptionDescriptor);
  1761 	}
  1762 
  1763 __EXECDECL__ void Exec::ThreadRequestSignal(TInt)
  1764 	{
  1765 	SLOW_EXEC1(EExecThreadRequestSignal);
  1766 	//TODO: look our thread per handle
  1767 	//gProcess.iThread.iRequestSemaphore.Signal();
  1768 	}
  1769 
  1770 __EXECDECL__ TBool Exec::MutexIsHeld(TInt)
  1771 	{
  1772 	SLOW_EXEC1(EExecMutexIsHeld);
  1773 	}
  1774 
  1775 __EXECDECL__ TTrapHandler* Exec::LeaveStart()
  1776 	{
  1777 	SLOW_EXEC0(EExecLeaveStart);
  1778 	//return gProcess.iThread.iHandler;
  1779 	}
  1780 
  1781 __EXECDECL__ void Exec::LeaveEnd()
  1782 	{
  1783 	SLOW_EXEC0(EExecLeaveEnd);	
  1784 	}
  1785 
  1786 __EXECDECL__ void Exec::SetDebugMaskIndex(TUint32, TUint)
  1787 	{
  1788 	SLOW_EXEC2(EExecSetDebugMaskIndex);
  1789 	}
  1790 
  1791 __EXECDECL__ TInt Exec::GetModuleNameFromAddress(TAny*, TDes8&)
  1792 	{
  1793 	SLOW_EXEC2(EExecGetModuleNameFromAddress);
  1794 	}
  1795 
  1796 __EXECDECL__ void Exec::NotifyChanges(TUint)
  1797 	{
  1798 	SLOW_EXEC1(EExecNotifyChanges);
  1799 	}
  1800 
  1801 __EXECDECL__ TInt Exec::SetGlobalUserData(TInt, TInt)
  1802 	{
  1803 	SLOW_EXEC2(EExecSetGlobalUserData);
  1804 	}
  1805 
  1806 __EXECDECL__ TInt Exec::SessionSecurityInfo(TInt, SSecurityInfo&)
  1807 	{
  1808 	SLOW_EXEC2(EExecSessionSecurityInfo);
  1809 	}
  1810 
  1811 __EXECDECL__ const TRequestStatus* Exec::MessageClientStatus(TInt)
  1812 	{
  1813 	SLOW_EXEC1(EExecMessageClientStatus);
  1814 	}
  1815 
  1816 __EXECDECL__ TInt Exec::SetFloatingPointMode(TFloatingPointMode, TFloatingPointRoundingMode)
  1817 	{
  1818 	SLOW_EXEC2(EExecSetFloatingPointMode);
  1819 	}
  1820 
  1821 EXPORT_C __EXECDECL__ TBool BTrace::CheckFilter2(TUint32, TUint32)
  1822 	{
  1823 	SLOW_EXEC2(EExecCheckFilter2);
  1824 	}
  1825 
  1826 __EXECDECL__ TAny* Exec::ProcessExeExportData()
  1827 	{
  1828 	SLOW_EXEC0(EExecProcessExeExportData);
  1829 	}
  1830 
  1831 EXPORT_C __EXECDECL__ TInt E32Loader::NotifyIfCodeSegDestroyed(TRequestStatus&)
  1832 	{
  1833 	SLOW_EXEC1(EExecNotifyIfCodeSegDestroyed);
  1834 	}
  1835 
  1836 EXPORT_C __EXECDECL__ TInt E32Loader::GetDestroyedCodeSegInfo(TCodeSegLoaderCookie&)
  1837 	{
  1838 	SLOW_EXEC1(EExecGetDestroyedCodeSegInfo);
  1839 	}
  1840 
  1841 EXPORT_C __EXECDECL__ TInt Exec::SetWin32RuntimeHook(TAny*)
  1842 	{
  1843 	SLOW_EXEC1(EExecSetWin32RuntimeHook);
  1844 	}
  1845 
  1846 __EXECDECL__ TInt Exec::GetBTraceId(TInt)
  1847 	{
  1848 	SLOW_EXEC1(EExecGetBTraceId);
  1849 	}
  1850 
  1851 __EXECDECL__ void Exec::NotifyOnIdle(TRequestStatus*)
  1852 	{
  1853 	SLOW_EXEC1(EExecNotifyOnIdle);
  1854 	}
  1855 
  1856 __EXECDECL__ void Exec::CancelMiscNotifier(TRequestStatus*)
  1857 	{
  1858 	SLOW_EXEC1(EExecCancelMiscNotifier);
  1859 	}
  1860 
  1861 __EXECDECL__ void Exec::NotifyObjectDestruction(TInt, TRequestStatus*)
  1862 	{
  1863 	SLOW_EXEC2(EExecNotifyObjectDestruction);
  1864 	}
  1865 
  1866 __EXECDECL__ void Exec::RegisterTrustedChunk(TInt)
  1867 	{
  1868 	SLOW_EXEC1(EExecRegisterTrustedChunk);
  1869 	}
  1870 
  1871 /*
  1872 Notify the kernel a thread is exiting.
  1873 
  1874 @param Exit reason
  1875 @return ETrue if this is the last thread in the process, EFalse otherwise.
  1876 */
  1877 __EXECDECL__ TBool Exec::UserThreadExiting(TInt aReason)
  1878 	{
  1879 	SLOW_EXEC1(EExecUserThreadExiting);
  1880 	//gProcess.Free();
  1881 	//return ETrue; //No thread support ATM so we are always the last thread
  1882 	}
  1883 
  1884 __EXECDECL__ TBool Exec::ChunkIsPaged(TInt)
  1885 	{
  1886 	SLOW_EXEC1(EExecChunkIsPaged);
  1887 	}
  1888 
  1889 __EXECDECL__ TBool Exec::ProcessDefaultDataPaged(TInt)
  1890 	{
  1891 	SLOW_EXEC1(EExecProcessDefaultDataPaged);
  1892 	}
  1893 
  1894 __EXECDECL__ TUint Exec::MessageClientThreadFlags(TInt)
  1895 	{
  1896 	SLOW_EXEC1(EExecMessageClientThreadFlags);
  1897 	}
  1898 
  1899 __EXECDECL__ TInt Exec::ShPoolCreate(const TShPoolInfo&, TUint)
  1900 	{
  1901 	SLOW_EXEC2(EExecShPoolCreate);
  1902 	}
  1903 
  1904 __EXECDECL__ TInt Exec::ShPoolAlloc(TInt, TUint, SShBufBaseAndSize&)
  1905 	{
  1906 	SLOW_EXEC3(EExecShPoolAlloc);
  1907 	}
  1908 
  1909 __EXECDECL__ void Exec::ShPoolGetInfo(TInt, TShPoolInfo&)
  1910 	{
  1911 	SLOW_EXEC2(EExecShPoolGetInfo);
  1912 	}
  1913 
  1914 __EXECDECL__ TUint Exec::ShPoolFreeCount(TInt)
  1915 	{
  1916 	SLOW_EXEC1(EExecShPoolFreeCount);
  1917 	}
  1918 
  1919 __EXECDECL__ TInt Exec::ShPoolNotification(TInt, TShPoolNotifyType, TUint, TRequestStatus&)
  1920 	{
  1921 	SLOW_EXEC4(EExecShPoolNotification);
  1922 	}
  1923 
  1924 __EXECDECL__ TInt Exec::ShPoolNotificationCancel(TInt, TShPoolNotifyType, TRequestStatus&)
  1925 	{
  1926 	SLOW_EXEC3(EExecShPoolNotificationCancel);
  1927 	}
  1928 
  1929 __EXECDECL__ TInt Exec::ShPoolBufferWindow(TInt, TInt, TBool)
  1930 	{
  1931 	SLOW_EXEC3(EExecShPoolBufferWindow);
  1932 	}
  1933 
  1934 __EXECDECL__ TInt Exec::ShBufMap(TInt, TBool, SShBufBaseAndSize&)
  1935 	{
  1936 	SLOW_EXEC3(EExecShBufMap);
  1937 	}
  1938 
  1939 __EXECDECL__ TInt Exec::ShBufUnMap(TInt)
  1940 	{
  1941 	SLOW_EXEC1(EExecShBufUnMap);
  1942 	}
  1943 
  1944 __EXECDECL__ TInt Exec::ShBufBaseAndSize(TInt, SShBufBaseAndSize&)
  1945 	{
  1946 	SLOW_EXEC2(EExecShBufBaseAndSize);
  1947 	}
  1948 
  1949 
  1950 
  1951 #endif
  1952 
  1953