Skip to content

Replace CoreCLR PAL wait subsystem - #132927

Draft
jkoritzinsky wants to merge 1 commit into
remove-coreclr-pal-semaphoresfrom
dev/jkoritzinsky/ubiquitous-guacamole
Draft

Replace CoreCLR PAL wait subsystem#132927
jkoritzinsky wants to merge 1 commit into
remove-coreclr-pal-semaphoresfrom
dev/jkoritzinsky/ubiquitous-guacamole

Conversation

@jkoritzinsky

Copy link
Copy Markdown
Member

CoreCLR's remaining Unix native waits are single-handle event waits, so the legacy PAL synchronization manager and its waitable handle infrastructure are no longer needed.

This change:

  • moves the NativeAOT event implementation into src/coreclr/runtime for shared CoreCLR and NativeAOT use, with direct Windows forwarding and a pthread-based Unix implementation;
  • adds PAL_Sleep, backed by Sleep on Windows and EINTR-safe nanosleep on Unix;
  • migrates Unix-reachable CoreCLR event and sleep callers to the shared PAL;
  • adds a Unix-only manual-reset thread-exit event so CoreCLR waits on that event instead of a PAL thread handle, while Windows continues waiting on the OS thread handle; and
  • removes the old PAL event, sleep, thread-wait, synchronization manager, controller, cache, and associated test infrastructure.

Testing

  • ./build.sh clr+libs+host
  • ./build.sh clr.native+clr.paltests
  • PAL test suite: 256 passed, 0 failed

Note

This pull request description was created by GitHub Copilot.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 4 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions github-actions Bot added the area-PAL-coreclr only for closed issues label Aug 29, 2026
@jkoritzinsky jkoritzinsky added area-VM-coreclr and removed area-PAL-coreclr only for closed issues labels Aug 29, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant