Rename AsyncSafeThreadMap to SignalSafeThreadMap#122794
Merged
Conversation
Co-authored-by: jkotas <[email protected]>
Copilot
AI
changed the title
[WIP] Rename AsyncSafeThreadMap to SignalSafeThreadMap in codebase
Rename AsyncSafeThreadMap to SignalSafeThreadMap
Dec 31, 2025
Contributor
There was a problem hiding this comment.
Pull request overview
This PR renames AsyncSafeThreadMap to SignalSafeThreadMap throughout the CoreCLR and NativeAOT codebases to avoid confusion with .NET's async/await terminology. The data structure is specifically designed for safe use within signal handlers on Unix platforms.
Key changes:
- Renamed files from
asyncsafethreadmap.{cpp,h}toSignalSafeThreadMap.{cpp,h}following PascalCase convention - Renamed all three public functions:
InsertThreadIntoSignalSafeMap,RemoveThreadFromSignalSafeMap,FindThreadInSignalSafeMap - Updated internal static variable
s_pSignalSafeThreadMapHeadand all comments/error messages to use "signal-safe" terminology
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/coreclr/vm/threads.cpp | Updated header include and function calls in GetThreadAsyncSafe() and SetThread() to use renamed signal-safe map functions |
| src/coreclr/vm/CMakeLists.txt | Updated build configuration to reference renamed SignalSafeThreadMap.{cpp,h} files |
| src/coreclr/runtime/SignalSafeThreadMap.h | Renamed header guards, function declarations, and comments from "async-safe" to "signal-safe" terminology |
| src/coreclr/runtime/SignalSafeThreadMap.cpp | Renamed static variable, function implementations, and internal comments to use "signal-safe" terminology |
| src/coreclr/nativeaot/Runtime/threadstore.cpp | Updated header include and function calls in AttachCurrentThread(), DetachCurrentThread(), and GetCurrentThreadIfAvailableAsyncSafe() |
| src/coreclr/nativeaot/Runtime/CMakeLists.txt | Updated build configuration to reference renamed SignalSafeThreadMap.cpp file |
Contributor
|
Tagging subscribers to this area: @mangod9 |
janvorli
approved these changes
Jan 2, 2026
This was referenced Jan 9, 2026
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renamed
AsyncSafeThreadMaptoSignalSafeThreadMapthroughout the codebase. The term "async" has specific established meaning in .NET (async/await patterns), while this data structure is designed for safe use in signal handlers.