-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add atomic operators for globals, memory, and setonce (#52868)
This implements `AtomicMemory`, atomic operations for globals, and the class of atomic function for setting a field or global or memory exactly once (setting undef => value). It is quite similar to an `@atomicreplace`, but where there was not a previous value. This is not needed for pointers, since it is simply calling C_NULL => pointer in that case, since there is no "undef" value that throws after load. plenty of future work still, for a later PR: - syntax lowering for `@atomic global x = y` and `@atomic closedover = y` - adding `Core.AtomicBox` for closure capture - generic functions for `atomicsetindex` & friends - macro for `@atomic x = y` and `@atomic x[] = y`, etc - design for `@atomiconce f()`
- Loading branch information
Showing
38 changed files
with
3,211 additions
and
1,041 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
Oops, something went wrong.