Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 31, 2025

Renamed AsyncSafeThreadMap to SignalSafeThreadMap throughout 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.

Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
Copilot AI changed the title [WIP] Rename AsyncSafeThreadMap to SignalSafeThreadMap in codebase Rename AsyncSafeThreadMap to SignalSafeThreadMap Dec 31, 2025
Copilot AI requested a review from jkotas December 31, 2025 05:24
@jkotas jkotas marked this pull request as ready for review December 31, 2025 06:20
@jkotas jkotas requested review from Copilot and janvorli December 31, 2025 06:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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} to SignalSafeThreadMap.{cpp,h} following PascalCase convention
  • Renamed all three public functions: InsertThreadIntoSignalSafeMap, RemoveThreadFromSignalSafeMap, FindThreadInSignalSafeMap
  • Updated internal static variable s_pSignalSafeThreadMapHead and 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

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

@janvorli janvorli merged commit f6d1c33 into main Jan 2, 2026
108 of 110 checks passed
@jkotas jkotas deleted the copilot/rename-async-to-signal-safe branch January 2, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants