-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Move CoreCLR over to the managed wait subsystem #117788
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
base: main
Are you sure you want to change the base?
Conversation
|
Tagging subscribers to this area: @mangod9 |
25446d0 to
63dc9af
Compare
06de3b2 to
63a1aa6
Compare
src/libraries/System.Private.CoreLib/src/System/Threading/LowLevelLifoSemaphore.Unix.cs
Outdated
Show resolved
Hide resolved
63a1aa6 to
2b610bf
Compare
src/coreclr/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetPageSize.cs
Outdated
Show resolved
Hide resolved
4a27a27 to
ac08ce6
Compare
2f66eeb to
60bcece
Compare
… logic is only for externally-attached threads)
src/coreclr/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs
Show resolved
Hide resolved
src/coreclr/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs
Show resolved
Hide resolved
… Thread.Interrupt on non-Windows (it's not needed any more).
| #cmakedefine01 HAVE_FULLY_FEATURED_PTHREAD_MUTEXES | ||
| #cmakedefine01 HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These can be removed from:
eng/native/tryrun.cmake: set_cache_value(HAVE_FULLY_FEATURED_PTHREAD_MUTEXES 1)
eng/native/tryrun.cmake: set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 1)
eng/native/tryrun.cmake: set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 0)
eng/native/tryrun.cmake: set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 0)
eng/native/tryrun.cmake: set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 0)
eng/native/tryrun.cmake: set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 0)
eng/native/tryrun_ios_tvos.cmake:set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 1)
|
|
||
| extern "C" BOOL QCALLTYPE ThreadNative_Join(QCall::ObjectHandleOnStack thread, INT32 Timeout) | ||
| #if TARGET_WINDOWS | ||
| extern "C" HANDLE QCALLTYPE ThreadNative_GetOSHandle(QCall::ThreadHandle t); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| extern "C" HANDLE QCALLTYPE ThreadNative_GetOSHandle(QCall::ThreadHandle t); | |
| extern "C" HANDLE QCALLTYPE ThreadNative_GetOSHandle(QCall::ThreadHandle t) |
| void | ||
| ThreadCleanupThread::EnsureCleanupThreadExists() | ||
| { | ||
| if (ForeignThreadsToCleanUpEvent == nullptr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can use contract. Can it throw?
| pEvent.SuppressRelease(); | ||
| Thread* pCleanupThread = SetupUnstartedThread(); | ||
|
|
||
| if (pCleanupThread->CreateNewThread(0, &ForeignThreadCleanupThreadStart, NULL, W(".NET External Thread Cleanup Thread"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to retry if any of this fails?
Use the shared managed wait subsystem for CoreCLR's managed code instead of the Win32 PAL
Also, remove the named mutex support from the CoreCLR PAL as nothing uses it now.
TODO: Once #117688 is in, we can remove Mutex support from the Win32 PAL entirely
Unblocks #115685
Depends on #117635