Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pal init: Move InitializeFlushProcessWriteBuffers() after VIRTUALInitialize() #107100

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions src/coreclr/pal/src/init/pal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,16 +359,6 @@ Initialize(
goto CLEANUP0a;
}

if (flags & PAL_INITIALIZE_FLUSH_PROCESS_WRITE_BUFFERS)
{
// Initialize before first thread is created for faster load on Linux
if (!InitializeFlushProcessWriteBuffers())
{
palError = ERROR_PALINIT_INITIALIZE_FLUSH_PROCESS_WRITE_BUFFERS;
goto CLEANUP0a;
}
}

// The gSharedFilesPath is allocated dynamically so its destructor does not get
// called unexpectedly during cleanup
gSharedFilesPath = InternalNew<PathCharString>();
Expand Down Expand Up @@ -616,6 +606,17 @@ Initialize(
goto CLEANUP10;
}

if (flags & PAL_INITIALIZE_FLUSH_PROCESS_WRITE_BUFFERS)
{
// Initialize before first thread is created for faster load on Linux
if (!InitializeFlushProcessWriteBuffers())
{
ERROR("Unable to initialize flush process write buffers\n");
palError = ERROR_PALINIT_INITIALIZE_FLUSH_PROCESS_WRITE_BUFFERS;
goto CLEANUP10;
}
}

if (flags & PAL_INITIALIZE_SYNC_THREAD)
{
//
Expand Down