TInt CallThrdProcEntry(TInt (*aFn)(void*), void* aPtr, TInt aNotFirst)
	{
	TCppRTExceptionsGlobals aExceptionGlobals;

	if (!aNotFirst)
		{
		// Init statics for implicitly linked DLLs
		User::InitProcess();

		// Init statics for EXE
		//pick up export table if we're an exexp
		__DLL_Export_Table__();
		__cpp_initialize__aeabi_();
		}
#ifdef __LEAVE_EQUALS_THROW__
	TInt r = KErrNone;

	try {
		r = aNotFirst ? (*aFn)(aPtr) : E32Main();
		}
	catch (XLeaveException&)
		{
		User::Panic(KLitUser, EUserLeaveWithoutTrap);
		}

	return r;
#else
	return aNotFirst ? (*aFn)(aPtr) : E32Main();
#endif
	}
Exemplo n.º 2
0
GLDEF_C TInt _E32Dll_Body(TInt aReason)
	{
	if (aReason==KModuleEntryReasonProcessAttach)
		{
		__DLL_Export_Table__();
		__cpp_initialize__aeabi_();
		}
	else if (aReason==KModuleEntryReasonProcessDetach)
		{
		int call_static_dtors = (int)run_static_dtors;
		if (call_static_dtors) run_static_dtors();
		return KErrNone;
		}
	return 0;
	}
Exemplo n.º 3
0
void mbed_toolchain_init()
{
    /* Run the C++ global object constructors */
    $Super$$__cpp_initialize__aeabi_();
}