1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/kerneltest/e32test/system/t_xprot.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,575 @@
1.4 +// Copyright (c) 1998-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 +// e32test\system\t_xprot.cpp
1.18 +//
1.19 +//
1.20 +
1.21 +#include <e32test.h>
1.22 +#include "execinfo.h"
1.23 +#include <u32arm.h>
1.24 +
1.25 +const TInt KSupervisorAddress=0x80000000;
1.26 +const TInt KGarbageAddress=0xeeddbbcc;
1.27 +
1.28 +TInt Handles[MAX_HANDLE];
1.29 +TInt DataArea[1024];
1.30 +TBuf8<1024> Buf8;
1.31 +TBuf<1024> Buf;
1.32 +TPtrC8 PtrC8(Buf8.Ptr(),10);
1.33 +TPtrC8 PtrC(Buf.Ptr(),10);
1.34 +TPtrC8 Ptr8(Buf8.Ptr(),10,1024);
1.35 +TPtrC8 Ptr(Buf.Ptr(),10,1024);
1.36 +TPtrC8 Ptr8N(NULL,10,1024);
1.37 +TPtrC8 PtrN(NULL,10,1024);
1.38 +TPtrC8 Ptr8I((TUint8*)KGarbageAddress,10,1024);
1.39 +TPtrC8 PtrI((TText*)KGarbageAddress,10,1024);
1.40 +TPtrC8 Ptr8S((TUint8*)KSupervisorAddress,10,1024);
1.41 +TPtrC8 PtrS((TText*)KSupervisorAddress,10,1024);
1.42 +TInt MessageHandle;
1.43 +
1.44 +TInt Args[4];
1.45 +
1.46 +TInt GetHandle(TInt& aState, TInt aHandleType)
1.47 + {
1.48 + TInt r;
1.49 + TInt t=aHandleType?aHandleType-1:ELibrary;
1.50 + switch(aState)
1.51 + {
1.52 + case 0: r=0; break;
1.53 + case 1: r=0xdeaddead; break;
1.54 + case 2: r=Handles[EThread]; break;
1.55 + case 3: r=Handles[t]; break;
1.56 + case 4: aState=0; return 0;
1.57 + }
1.58 + ++aState;
1.59 + return r;
1.60 + }
1.61 +
1.62 +TInt GetAnyInt(TInt& aState)
1.63 + {
1.64 + TInt r;
1.65 + switch(aState)
1.66 + {
1.67 + case 0: r=0; break;
1.68 + case 1: r=1; break;
1.69 + case 2: r=2; break;
1.70 + case 3: r=-1; break;
1.71 + case 4: r=299792458; break;
1.72 + case 5: aState=0; return 0;
1.73 + }
1.74 + ++aState;
1.75 + return r;
1.76 + }
1.77 +
1.78 +TInt GetAnyPtr(TInt& aState)
1.79 + {
1.80 + TInt r;
1.81 + switch(aState)
1.82 + {
1.83 + case 0: r=0; break;
1.84 + case 1: r=KGarbageAddress; break;
1.85 + case 2: r=KSupervisorAddress; break;
1.86 + case 3: r=(TInt)DataArea; break;
1.87 + case 4: aState=0; return 0;
1.88 + }
1.89 + ++aState;
1.90 + return r;
1.91 + }
1.92 +
1.93 +TInt GetIntPtr(TInt& aState)
1.94 + {
1.95 + TInt r;
1.96 + switch(aState)
1.97 + {
1.98 + case 0: r=0; break;
1.99 + case 1: r=KGarbageAddress; break;
1.100 + case 2: r=((TInt)DataArea)+1; break;
1.101 + case 3: r=KSupervisorAddress; break;
1.102 + case 4: r=(TInt)DataArea; break;
1.103 + case 5: aState=0; return 0;
1.104 + }
1.105 + ++aState;
1.106 + return r;
1.107 + }
1.108 +
1.109 +TInt GetDes8(TInt& aState)
1.110 + {
1.111 + TInt r;
1.112 + switch(aState)
1.113 + {
1.114 + case 0: r=0; break;
1.115 + case 1: r=KGarbageAddress; break;
1.116 + case 2: r=KSupervisorAddress; break;
1.117 + case 3: r=(TInt)&Ptr8N; break;
1.118 + case 4: r=(TInt)&Ptr8I; break;
1.119 + case 5: r=(TInt)&Ptr8S; break;
1.120 + case 6: r=(TInt)&Ptr8; break;
1.121 + case 7: aState=0; return 0;
1.122 + }
1.123 + ++aState;
1.124 + return r;
1.125 + }
1.126 +
1.127 +TInt GetWDes8(TInt& aState)
1.128 + {
1.129 + TInt r;
1.130 + switch(aState)
1.131 + {
1.132 + case 0: r=0; break;
1.133 + case 1: r=KGarbageAddress; break;
1.134 + case 2: r=KSupervisorAddress; break;
1.135 + case 3: r=(TInt)&Ptr8N; break;
1.136 + case 4: r=(TInt)&Ptr8I; break;
1.137 + case 5: r=(TInt)&Ptr8S; break;
1.138 + case 6: r=(TInt)&PtrC8; break;
1.139 + case 7: r=(TInt)&Ptr8; break;
1.140 + case 8: aState=0; return 0;
1.141 + }
1.142 + ++aState;
1.143 + return r;
1.144 + }
1.145 +
1.146 +TInt GetDes(TInt& aState)
1.147 + {
1.148 + TInt r;
1.149 + switch(aState)
1.150 + {
1.151 + case 0: r=0; break;
1.152 + case 1: r=KGarbageAddress; break;
1.153 + case 2: r=KSupervisorAddress; break;
1.154 + case 3: r=(TInt)&PtrN; break;
1.155 + case 4: r=(TInt)&PtrI; break;
1.156 + case 5: r=(TInt)&PtrS; break;
1.157 + case 6: r=(TInt)&Ptr; break;
1.158 + case 7: aState=0; return 0;
1.159 + }
1.160 + ++aState;
1.161 + return r;
1.162 + }
1.163 +
1.164 +TInt GetWDes(TInt& aState)
1.165 + {
1.166 + TInt r;
1.167 + switch(aState)
1.168 + {
1.169 + case 0: r=0; break;
1.170 + case 1: r=KGarbageAddress; break;
1.171 + case 2: r=KSupervisorAddress; break;
1.172 + case 3: r=(TInt)&PtrN; break;
1.173 + case 4: r=(TInt)&PtrI; break;
1.174 + case 5: r=(TInt)&PtrS; break;
1.175 + case 6: r=(TInt)&PtrC; break;
1.176 + case 7: r=(TInt)&Ptr; break;
1.177 + case 8: aState=0; return 0;
1.178 + }
1.179 + ++aState;
1.180 + return r;
1.181 + }
1.182 +
1.183 +TInt GetBool(TInt& aState)
1.184 + {
1.185 + TInt r;
1.186 + switch(aState)
1.187 + {
1.188 + case 0: r=0; break;
1.189 + case 1: r=1; break;
1.190 + case 2: r=299792458; break;
1.191 + case 3: aState=0; return 0;
1.192 + }
1.193 + ++aState;
1.194 + return r;
1.195 + }
1.196 +
1.197 +TInt GetObjectType(TInt& aState)
1.198 + {
1.199 + TInt r;
1.200 + switch(aState)
1.201 + {
1.202 + case 0: r=EThread; break;
1.203 + case 1: r=ELibrary; break;
1.204 + case 2: r=ENumObjectType; break;
1.205 + case 3: r=20000; break;
1.206 + case 4: aState=0; return 0;
1.207 + }
1.208 + ++aState;
1.209 + return r;
1.210 + }
1.211 +
1.212 +TInt GetDevUnit(TInt& aState)
1.213 + {
1.214 + TInt r;
1.215 + switch(aState)
1.216 + {
1.217 + case 0: r=0; break;
1.218 + case 1: r=1; break;
1.219 + case 2: r=20000; break;
1.220 + case 3: aState=0; return 0;
1.221 + }
1.222 + ++aState;
1.223 + return r;
1.224 + }
1.225 +
1.226 +TInt GetMsgHandle(TInt& aState)
1.227 + {
1.228 + TInt r;
1.229 + switch(aState)
1.230 + {
1.231 + case 0: r=0; break;
1.232 + case 1: r=KGarbageAddress; break;
1.233 + case 2: r=(TInt)DataArea; break;
1.234 + case 3: r=KSupervisorAddress; break;
1.235 + case 4: r=MessageHandle; break;
1.236 + case 5: aState=0; return 0;
1.237 + }
1.238 + ++aState;
1.239 + return r;
1.240 + }
1.241 +
1.242 +TInt GetModuleHandle(TInt& aState)
1.243 + {
1.244 + TInt r;
1.245 + switch(aState)
1.246 + {
1.247 + case 0: r=0; break;
1.248 + case 1: r=KGarbageAddress; break;
1.249 + case 2: r=ModuleHandle; break;
1.250 + case 3: aState=0; return 0;
1.251 + }
1.252 + ++aState;
1.253 + return r;
1.254 + }
1.255 +
1.256 +TInt GetSessionHandlePtr(TInt& aState)
1.257 + {
1.258 + TInt r;
1.259 + switch(aState)
1.260 + {
1.261 + case 0: r=0; break;
1.262 + case 1: r=KGarbageAddress; break;
1.263 + case 2: r=KSupervisorAddress; break;
1.264 + case 3: r=(TInt)&Handles[ESession]; break;
1.265 + case 4: aState=0; return 0;
1.266 + }
1.267 + ++aState;
1.268 + return r;
1.269 + }
1.270 +
1.271 +TInt GetArgument(TInt& aState, TInt aArgType)
1.272 + {
1.273 + if (aArgType==NO_PAR)
1.274 + return 0;
1.275 + if (aArgType<MAX_HANDLE)
1.276 + return GetHandle(aState,aArgType);
1.277 + switch (aArgType)
1.278 + {
1.279 + case ANY_INT: return GetAnyInt(aState);
1.280 + case ANY_PTR: return GetAnyPtr(aState);
1.281 + case INT_PTR: return GetIntPtr(aState);
1.282 + case DES8: return GetDes8(aState);
1.283 + case WDES8: return GetWDes8(aState);
1.284 + case DES: return GetDes(aState);
1.285 + case WDES: return GetWDes(aState);
1.286 + case BOOL: return GetBool(aState);
1.287 + case OBJECT_TYPE: return GetObjectType(aState);
1.288 + case DEV_UNIT: return GetDevUnit(aState);
1.289 + case MSG_HANDLE: return GetMsgHandle(aState);
1.290 + case MODULE_HANDLE: return GetModuleHandle(aState);
1.291 + case SESSION_HANDLE_PTR: return GetSessionHandlePtr(aState);
1.292 + }
1.293 + User::Panic(_L("UNKNOWN ARG TYPE"),aArgType);
1.294 + }
1.295 +
1.296 +#define FAST_EXEC(n) asm("swi %a0" : : "i" (n|EXECUTIVE_FAST))
1.297 +__NAKED__ void DoFastExecCall(TInt /*aExecNum*/)
1.298 + {
1.299 + asm("ldr r1, __Args ");
1.300 + asm("mov ip, lr ");
1.301 + asm("ldmfd r1, {r0-r3} ");
1.302 + asm("add pc, pc, r0, lsl #2 ");
1.303 + asm("nop )";
1.304 +
1.305 + FAST_EXEC(EFastExecWaitForAnyRequest);
1.306 + FAST_EXEC(EFastExecLanguage);
1.307 + FAST_EXEC(EFastExecHeap);
1.308 + FAST_EXEC(EFastExecHeapSwitch);
1.309 + FAST_EXEC(EFastExecPushTrapFrame);
1.310 + FAST_EXEC(EFastExecPopTrapFrame);
1.311 + FAST_EXEC(EFastExecActiveScheduler);
1.312 + FAST_EXEC(EFastExecSetActiveScheduler);
1.313 + FAST_EXEC(EFastExecLockPeriod);
1.314 + FAST_EXEC(EFastExecTrapHandler);
1.315 + FAST_EXEC(EFastExecSetTrapHandler);
1.316 + FAST_EXEC(EFastExecLockedInc);
1.317 + FAST_EXEC(EFastExecLockedDec);
1.318 + FAST_EXEC(EFastExecDebugMask);
1.319 + FAST_EXEC(EFastExecSetDebugMask);
1.320 + FAST_EXEC(EFastExecFastCounter);
1.321 + FAST_EXEC(EFastExecGetLocaleCharSet);
1.322 + FAST_EXEC(EFastExecLockRamDrive);
1.323 + FAST_EXEC(EFastExecUnlockRamDrive);
1.324 + FAST_EXEC(EFastExecRomHeaderAddress);
1.325 + FAST_EXEC(EFastExecRomRootDirAddress);
1.326 + FAST_EXEC(EFastExecJustInTime);
1.327 + FAST_EXEC(EFastExecSetJustInTime);
1.328 + FAST_EXEC(EFastExecBlockThreads);
1.329 + FAST_EXEC(EFastExecKernelStartup);
1.330 + FAST_EXEC(EFastExecFatUtilityFunctions);
1.331 + FAST_EXEC(EFastExecSafeInc);
1.332 + FAST_EXEC(EFastExecSafeDec);
1.333 +
1.334 + asm("__Args: ");
1.335 + asm(".word Args ");
1.336 + }
1.337 +
1.338 +#define SLOW_EXEC(n) asm("swi %a0" : : "i" (n))
1.339 +__NAKED__ void DoSlowExecCall(TInt /*aExecNum*/)
1.340 + {
1.341 + asm("ldr r1, __Args ");
1.342 + asm("mov ip, lr ");
1.343 + asm("ldmfd r1, {r0-r3} ");
1.344 + asm("add pc, pc, r0, lsl #2 ");
1.345 + asm("nop )";
1.346 +
1.347 + SLOW_EXEC(EExecObjectNext);
1.348 + SLOW_EXEC(EExecChunkBase);
1.349 + SLOW_EXEC(EExecChunkSize);
1.350 + SLOW_EXEC(EExecChunkMaxSize);
1.351 + SLOW_EXEC(EExecHandleAttributes);
1.352 + SLOW_EXEC(EExecTickCount);
1.353 + SLOW_EXEC(EExecLogicalDeviceGetCaps);
1.354 + SLOW_EXEC(EExecLogicalDeviceQueryVersionSupported);
1.355 + SLOW_EXEC(EExecLogicalDeviceIsAvailable);
1.356 + SLOW_EXEC(EExecDllGlobalAlloc);
1.357 + SLOW_EXEC(EExecChangeLocale);
1.358 + SLOW_EXEC(EExecChannelRequest);
1.359 + SLOW_EXEC(EExecMathRandom);
1.360 + SLOW_EXEC(EExecChannelControl);
1.361 + SLOW_EXEC(EExecResetMachine);
1.362 + SLOW_EXEC(EExecLibraryLookup);
1.363 + SLOW_EXEC(EExecLibraryEntryPoint);
1.364 + SLOW_EXEC(EExecLibraryDllRefTable);
1.365 + SLOW_EXEC(EExecStaticCallList);
1.366 + SLOW_EXEC(EExecDynamicCallList);
1.367 + SLOW_EXEC(EExecLibraryCallList);
1.368 + SLOW_EXEC(EExecLibraryFileName);
1.369 + SLOW_EXEC(EExecExecuteInSupervisorMode);
1.370 + SLOW_EXEC(EExecMutexCount);
1.371 + SLOW_EXEC(EExecMutexWait);
1.372 + SLOW_EXEC(EExecMutexSignal);
1.373 + SLOW_EXEC(EExecProcessId);
1.374 + SLOW_EXEC(EExecDllFileName);
1.375 + SLOW_EXEC(EExecProcessResume);
1.376 + SLOW_EXEC(EExecProcessFileName);
1.377 + SLOW_EXEC(EExecProcessCommandLine);
1.378 + SLOW_EXEC(EExecProcessExitType);
1.379 + SLOW_EXEC(EExecProcessExitReason);
1.380 + SLOW_EXEC(EExecProcessExitCategory);
1.381 + SLOW_EXEC(EExecProcessPriority);
1.382 + SLOW_EXEC(EExecProcessSetPriority);
1.383 + SLOW_EXEC(EExecProcessFlags);
1.384 + SLOW_EXEC(EExecProcessSetFlags);
1.385 + SLOW_EXEC(EExecProcessSetOwner);
1.386 + SLOW_EXEC(EExecDllInitialiseData);
1.387 + SLOW_EXEC(EExecSemaphoreCount);
1.388 + SLOW_EXEC(EExecSemaphoreWait);
1.389 + SLOW_EXEC(EExecSemaphoreSignal1);
1.390 + SLOW_EXEC(EExecSemaphoreSignalN);
1.391 + SLOW_EXEC(EExecDllFreeData);
1.392 + SLOW_EXEC(EExecServerReceive);
1.393 + SLOW_EXEC(EExecServerCancel);
1.394 + SLOW_EXEC(EExecSetSessionPtr);
1.395 + SLOW_EXEC(EExecSessionSend);
1.396 + SLOW_EXEC(EExecThreadId);
1.397 + SLOW_EXEC(EExecSessionShare);
1.398 + SLOW_EXEC(EExecThreadResume);
1.399 + SLOW_EXEC(EExecThreadSuspend);
1.400 + SLOW_EXEC(EExecThreadPriority);
1.401 + SLOW_EXEC(EExecThreadSetPriority);
1.402 + SLOW_EXEC(EExecThreadProcessPriority);
1.403 + SLOW_EXEC(EExecThreadSetProcessPriority);
1.404 + SLOW_EXEC(EExecThreadFlags);
1.405 + SLOW_EXEC(EExecThreadSetFlags);
1.406 + SLOW_EXEC(EExecThreadRequestCount);
1.407 + SLOW_EXEC(EExecThreadExitType);
1.408 + SLOW_EXEC(EExecThreadExitReason);
1.409 + SLOW_EXEC(EExecThreadExitCategory);
1.410 + SLOW_EXEC(EExecThreadGetDesLength);
1.411 + SLOW_EXEC(EExecThreadGetDesMaxLength);
1.412 + SLOW_EXEC(EExecThreadRead8);
1.413 + SLOW_EXEC(EExecThreadRead16);
1.414 + SLOW_EXEC(EExecThreadWrite8);
1.415 + SLOW_EXEC(EExecThreadWrite16);
1.416 + SLOW_EXEC(EExecTimerCancel);
1.417 + SLOW_EXEC(EExecTimerAfter);
1.418 + SLOW_EXEC(EExecTimerAt);
1.419 + SLOW_EXEC(EExecTimerLock);
1.420 + SLOW_EXEC(EExecChangeNotifierLogon);
1.421 + SLOW_EXEC(EExecChangeNotifierLogoff);
1.422 + SLOW_EXEC(EExecRequestSignal);
1.423 + SLOW_EXEC(EExecMatch8);
1.424 + SLOW_EXEC(EExecMatch16);
1.425 + SLOW_EXEC(EExecFind8);
1.426 + SLOW_EXEC(EExecFind16);
1.427 + SLOW_EXEC(EExecLocateF8);
1.428 + SLOW_EXEC(EExecLocateF16);
1.429 + SLOW_EXEC(EExecHandleName);
1.430 + SLOW_EXEC(EExecHandleFullName);
1.431 + SLOW_EXEC(EExecHandleInfo);
1.432 + SLOW_EXEC(EExecHandleCount);
1.433 + SLOW_EXEC(EExecAfter);
1.434 + SLOW_EXEC(EExecAt);
1.435 + SLOW_EXEC(EExecDayName);
1.436 + SLOW_EXEC(EExecDayNameAbb);
1.437 + SLOW_EXEC(EExecMonthName);
1.438 + SLOW_EXEC(EExecMonthNameAbb);
1.439 + SLOW_EXEC(EExecSuffix);
1.440 + SLOW_EXEC(EExecAmPmName);
1.441 + SLOW_EXEC(EExecCurrencySymbol);
1.442 + SLOW_EXEC(EExecLocale);
1.443 + SLOW_EXEC(EExecLocaleSet);
1.444 + SLOW_EXEC(EExecLocaleMessageText);
1.445 + SLOW_EXEC(EExecMessageComplete);
1.446 + SLOW_EXEC(EExecTimeNow);
1.447 + SLOW_EXEC(EExecSetHomeTime);
1.448 + SLOW_EXEC(EExecSetMachineConfiguration);
1.449 + SLOW_EXEC(EExecCaptureEventHook);
1.450 + SLOW_EXEC(EExecReleaseEventHook);
1.451 + SLOW_EXEC(EExecRequestEvent);
1.452 + SLOW_EXEC(EExecRequestEventCancel);
1.453 + SLOW_EXEC(EExecAddEvent);
1.454 + SLOW_EXEC(EExecSessionSendSync);
1.455 + SLOW_EXEC(EExecDllGlobalAllocated);
1.456 + SLOW_EXEC(EExecDllGlobalRead);
1.457 + SLOW_EXEC(EExecDllGlobalWrite);
1.458 + SLOW_EXEC(EExecDllTls);
1.459 + SLOW_EXEC(EExecHalFunction);
1.460 + SLOW_EXEC(EExecSessionAttach);
1.461 + SLOW_EXEC(EExecWsRegisterThread);
1.462 + SLOW_EXEC(EExecFsRegisterThread);
1.463 + SLOW_EXEC(EExecProcessCommandLineLength);
1.464 + SLOW_EXEC(EExecTimerInactivity);
1.465 + SLOW_EXEC(EExecUserInactivityTime);
1.466 + SLOW_EXEC(EExecShortDateFormatSpec);
1.467 + SLOW_EXEC(EExecLongDateFormatSpec);
1.468 + SLOW_EXEC(EExecTimeFormatSpec);
1.469 + SLOW_EXEC(EExecResetInactivityTime);
1.470 + SLOW_EXEC(EExecDebugFunction);
1.471 + SLOW_EXEC(EExecBreakPoint);
1.472 + SLOW_EXEC(EExecProfileStart);
1.473 + SLOW_EXEC(EExecProfileEnd);
1.474 + SLOW_EXEC(EExecPasswordIsEnabled);
1.475 + SLOW_EXEC(EExecPasswordIsValid);
1.476 + SLOW_EXEC(EExecExceptionHandler);
1.477 + SLOW_EXEC(EExecSetExceptionHandler);
1.478 + SLOW_EXEC(EExecModifyExceptionMask);
1.479 + SLOW_EXEC(EExecRaiseException);
1.480 + SLOW_EXEC(EExecIsExceptionHandled);
1.481 + SLOW_EXEC(EExecThreadGetRamSizes);
1.482 + SLOW_EXEC(EExecProcessGetRamSizes);
1.483 + SLOW_EXEC(EExecLibraryGetRamSizes);
1.484 + SLOW_EXEC(EExecMachineConfiguration);
1.485 + SLOW_EXEC(EExecWasChunkSetHeapInfo);
1.486 + SLOW_EXEC(EExecLibraryType);
1.487 + SLOW_EXEC(EExecProcessType);
1.488 + SLOW_EXEC(EExecPasswordSetEnabled);
1.489 + SLOW_EXEC(EExecPasswordSet);
1.490 + SLOW_EXEC(EExecSetCurrencySymbol);
1.491 + SLOW_EXEC(EExecProcessSetType);
1.492 + SLOW_EXEC(EExecChunkBottom);
1.493 + SLOW_EXEC(EExecChunkTop);
1.494 + SLOW_EXEC(EExecThreadContext);
1.495 + SLOW_EXEC(EExecDllDataInfo);
1.496 + SLOW_EXEC(EExecThreadCreate);
1.497 + SLOW_EXEC(EExecProcessCreate);
1.498 + SLOW_EXEC(EExecProcessLoaded);
1.499 + SLOW_EXEC(EExecFindHandleOpen);
1.500 + SLOW_EXEC(EExecHandleClose);
1.501 + SLOW_EXEC(EExecChunkCreate);
1.502 + SLOW_EXEC(EExecChunkAdjust);
1.503 + SLOW_EXEC(EExecOpenNamedObject);
1.504 + SLOW_EXEC(EExecHandleDuplicate);
1.505 + SLOW_EXEC(EExecMutexCreate);
1.506 + SLOW_EXEC(EExecSemaphoreCreate);
1.507 + SLOW_EXEC(EExecThreadOpenById);
1.508 + SLOW_EXEC(EExecProcessOpenById);
1.509 + SLOW_EXEC(EExecThreadKill);
1.510 + SLOW_EXEC(EExecThreadLogon);
1.511 + SLOW_EXEC(EExecThreadLogonCancel);
1.512 + SLOW_EXEC(EExecDllSetTls);
1.513 + SLOW_EXEC(EExecDllFreeTls);
1.514 + SLOW_EXEC(EExecThreadRename);
1.515 + SLOW_EXEC(EExecProcessRename);
1.516 + SLOW_EXEC(EExecProcessKill);
1.517 + SLOW_EXEC(EExecProcessOwner);
1.518 + SLOW_EXEC(EExecProcessLogon);
1.519 + SLOW_EXEC(EExecProcessLogonCancel);
1.520 + SLOW_EXEC(EExecThreadSetInitialParameter);
1.521 + SLOW_EXEC(EExecThreadProcess);
1.522 + SLOW_EXEC(EExecThreadGetHeap);
1.523 + SLOW_EXEC(EExecServerCreate);
1.524 + SLOW_EXEC(EExecSessionCreate);
1.525 + SLOW_EXEC(EExecLibraryLoadExact);
1.526 + SLOW_EXEC(EExecLibraryLoaded);
1.527 + SLOW_EXEC(EExecDeviceLoad);
1.528 + SLOW_EXEC(EExecDeviceFree);
1.529 + SLOW_EXEC(EExecChannelCreate);
1.530 + SLOW_EXEC(EExecTimerCreate);
1.531 + SLOW_EXEC(EExecDllAddDependency);
1.532 + SLOW_EXEC(EExecTimerHighRes);
1.533 + SLOW_EXEC(EExecAfterHighRes);
1.534 + SLOW_EXEC(EExecChangeNotifierCreate);
1.535 + SLOW_EXEC(EExecUndertakerCreate);
1.536 + SLOW_EXEC(EExecUndertakerLogon);
1.537 + SLOW_EXEC(EExecUndertakerLogonCancel);
1.538 + SLOW_EXEC(EExecKernelHeapDebug);
1.539 + SLOW_EXEC(EExecThreadGetCpuTime);
1.540 + }
1.541 +
1.542 +
1.543 +void TestExec(const SExecInfo& aInfo, TBool aFast)
1.544 + {
1.545 + TInt xn=aInfo.iExecNum;
1.546 + TInt np=aInfo.iNumParams;
1.547 + if (np==0)
1.548 + return; // no parameters
1.549 + if (!aFast)
1.550 + {
1.551 + // don't do some slow execs
1.552 + switch (xn)
1.553 + {
1.554 + // loader group (could be restricted to F32)
1.555 + case EExecProcessCreate:
1.556 + case EExecProcessLoaded:
1.557 + case EExecLibraryLoadExact:
1.558 + case EExecLibraryLoaded:
1.559 + case EExecDllAddDependency:
1.560 + return;
1.561 + // descriptor processing (could be moved user side)
1.562 + case EExecMatch8:
1.563 + case EExecMatch16:
1.564 + case EExecLocateF8:
1.565 + case EExecLocateF16:
1.566 + case EExecFind8:
1.567 + case EExecFind16:
1.568 + return;
1.569 +
1.570 + // we don't want to do this
1.571 + case EExecResetMachine:
1.572 + return;
1.573 + }
1.574 + }
1.575 +
1.576 + TInt state[4];
1.577 + Mem::FillZ(state,sizeof(state));
1.578 + }