-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some refactoring of thread suspension. (#34666)
* m_dwForbidSuspendThread * Remove some fibers stuff * g_TrapReturningThreads * g_pGCSuspendEvent * m_pThreadAttemptingSuspendForGC * refactor SuspendRuntime into just one loop * Suspend iteration after updating hijacks should "observeOnly" - no point to update hijacks again right away. * avoid retrying to suspend threads that are already in redirected state. * PR feedback * "premptive" - common typo apparently * missing profiler notification on suspend end and `DisableStressHeap` stuff * indentation and infinite loop style * Removed GTF_DONT_CSE flag on `g_TrapReturningThreads` load in GCPoll and added comment explaining why. * reverted an accidentally removed assert * removed SWITCHOUT_HANDLE_VALUE entirely - not different from INVALID_HANDLE_VALUE now * some cleanups and more comments when non-GC suspension yields to GC * Few tweaks for the concerns discussed in the PR * On Server GC `pCurThread` is NULL. Need to fix an ASSERT to account for the possibility of NULL.
- Loading branch information
Showing
8 changed files
with
367 additions
and
561 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.