summaryrefslogtreecommitdiff
path: root/src/pal/src/init/pal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/src/init/pal.cpp')
-rw-r--r--src/pal/src/init/pal.cpp57
1 files changed, 23 insertions, 34 deletions
diff --git a/src/pal/src/init/pal.cpp b/src/pal/src/init/pal.cpp
index 2fdafe4f8c..fea00b5ee6 100644
--- a/src/pal/src/init/pal.cpp
+++ b/src/pal/src/init/pal.cpp
@@ -265,17 +265,6 @@ Initialize(
goto CLEANUP0;
}
-#if _DEBUG
- // Verify that our page size is what we think it is. If it's
- // different, we can't run.
- if (VIRTUAL_PAGE_SIZE != getpagesize())
- {
- ASSERT("VIRTUAL_PAGE_SIZE is incorrect for this system!\n"
- "Change include/pal/virtual.h and clr/src/inc/stdmacros.h "
- "to reflect the correct page size of %d.\n", getpagesize());
- }
-#endif // _DEBUG
-
if (!INIT_IncreaseDescriptorLimit())
{
ERROR("Unable to increase the file descriptor limit!\n");
@@ -465,28 +454,8 @@ Initialize(
goto CLEANUP2;
}
- if (flags & PAL_INITIALIZE_SYNC_THREAD)
- {
- //
- // Tell the synchronization manager to start its worker thread
- //
- palError = CPalSynchMgrController::StartWorker(pThread);
- if (NO_ERROR != palError)
- {
- ERROR("Synch manager failed to start worker thread\n");
- goto CLEANUP5;
- }
- }
-
palError = ERROR_GEN_FAILURE;
- /* initialize structured exception handling stuff (signals, etc) */
- if (FALSE == SEHInitialize(pThread, flags))
- {
- ERROR("Unable to initialize SEH support\n");
- goto CLEANUP5;
- }
-
if (FALSE == TIMEInitialize())
{
ERROR("Unable to initialize TIME support\n");
@@ -508,13 +477,33 @@ Initialize(
goto CLEANUP10;
}
+ if (flags & PAL_INITIALIZE_SYNC_THREAD)
+ {
+ //
+ // Tell the synchronization manager to start its worker thread
+ //
+ palError = CPalSynchMgrController::StartWorker(pThread);
+ if (NO_ERROR != palError)
+ {
+ ERROR("Synch manager failed to start worker thread\n");
+ goto CLEANUP13;
+ }
+ }
+
+ /* initialize structured exception handling stuff (signals, etc) */
+ if (FALSE == SEHInitialize(pThread, flags))
+ {
+ ERROR("Unable to initialize SEH support\n");
+ goto CLEANUP13;
+ }
+
if (flags & PAL_INITIALIZE_STD_HANDLES)
{
/* create file objects for standard handles */
if (!FILEInitStdHandles())
{
ERROR("Unable to initialize standard file handles\n");
- goto CLEANUP13;
+ goto CLEANUP14;
}
}
@@ -559,13 +548,13 @@ Initialize(
/* No cleanup required for CRTInitStdStreams */
CLEANUP15:
FILECleanupStdHandles();
+CLEANUP14:
+ SEHCleanup();
CLEANUP13:
VIRTUALCleanup();
CLEANUP10:
MAPCleanup();
CLEANUP6:
- SEHCleanup();
-CLEANUP5:
PROCCleanupInitialProcess();
CLEANUP2:
free(exe_path);