Update contrib.
1 // Copyright (c) 2004-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 "ARM EABI LICENCE.txt"
5 // which accompanies this distribution, and is available
6 // in kernel/eka/compsupp.
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32\compsupp\symaehabi\callfirstprocessfn.cpp
18 #include "unwind_env.h"
20 #include "symbian_support.h"
23 #ifdef __LEAVE_EQUALS_THROW__
24 _LIT(KLitUser,"USER");
29 #ifdef __KERNEL_MODE__
30 #error This file should not be compiled in kernel mode
35 void __cpp_initialize__aeabi_();
36 void __DLL_Export_Table__();
38 TInt CallThrdProcEntry(TInt (*aFn)(void*), void* aPtr, TInt aNotFirst)
40 TCppRTExceptionsGlobals aExceptionGlobals;
44 // Init statics for implicitly linked DLLs
47 // Init statics for EXE
48 //pick up export table if we're an exexp
49 __DLL_Export_Table__();
50 __cpp_initialize__aeabi_();
52 #ifdef __LEAVE_EQUALS_THROW__
56 r = aNotFirst ? (*aFn)(aPtr) : E32Main();
58 catch (XLeaveException&)
60 User::Panic(KLitUser, EUserLeaveWithoutTrap);
65 return aNotFirst ? (*aFn)(aPtr) : E32Main();