-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Interlocked for small types. (#92974)
* Implement Interlocked for small types. Implements Interlocked.CompareExchange/Exchange for byte/sbyte/short/ushort. Uses an intrinsic on CoreCLR x64 and ARM64 and fallbacks for other platforms. Fixes #64658. * Fix xarch assert * Update PalRedhawkInline.h * Update PalRedhawkInline.h * Update threads.c * Simplify NAOT handling * Fix build * Update atomic.h * Update atomic.h * Update atomic.h * Fix windows intrinsics * Update comutilnative.cpp * Fix Windows builds * Update icall-def.h * Fix icall-def.h * Improve tests * Update InterlockedTests.cs * Remove small type normalization * Try to fix the intrinsics * Fix ARM64 build * Try to fix XArch 66 prefix and ARM64 * Fix typo * Fix assert * Code cleanup * Update importercalls.cpp * Update importercalls.cpp * Extend small types properly * Add RISC-V asserts * c11 atomics interlocked ops for small types * Simplify Windows atomics * Restore NativeAOT fallbacks for other platforms * Add more tests * Format * Update Interlocked.cs * Fix tests and comment * Add emitOutputCV handling * Fix extension * Use a slightly better fix * More complete fix * Fix the fix * Fix more places * CR feedback * Fix corelib * Fix tests * Add using * Match NativeAOT #ifs * Update Interlocked.cs * Fix test projects * Fix tests, try linking with libatomic * Improve build test * Fix tests * Fix tests again * Remove libatomic Co-authored-by: Jan Kotas <jkotas@microsoft.com> * Cleanup, fix helper extension * Fix test corelib --------- Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com> Co-authored-by: Aleksey Kliger <alklig@microsoft.com> Co-authored-by: Jan Kotas <jkotas@microsoft.com>
- Loading branch information
1 parent
dd158ba
commit de9d791
Showing
34 changed files
with
1,102 additions
and
192 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
Oops, something went wrong.