First public contribution.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32\euser\epoc\x86\uc_exe.cpp
22 // include the static data definitions
28 GLREF_C TInt E32Main();
32 void globalDestructorFunc()
34 destroyStatics(); // this is a macro
37 void __fastcall RunThread(TBool aNotFirst, SThreadCreateInfo& aInfo)
39 SStdEpocThreadCreateInfo& cinfo = (SStdEpocThreadCreateInfo&)aInfo;
41 #ifdef USE_INSTRUMENTED_HEAP
42 cinfo.iFlags |= ETraceHeapAllocs;
43 #elif defined(ENABLE_HEAP_MONITORING)
44 cinfo.iFlags |= ETraceHeapAllocs|EMonitorHeapMemory;
46 TInt r = UserHeap::SetupThreadHeap(aNotFirst, cinfo);
49 r = UserSvr::DllSetTls(KGlobalDestructorTlsKey, KDllUid_Special, (TAny*)globalDestructorFunc);
54 r = (*cinfo.iFunction)(cinfo.iPtr);
57 // Init statics for implicitly linked DLLs
60 // Init statics for EXE