https://github.com/JuliaLang/julia
Revision 8db129472ea88a9c5c4a6e94dff7b330723aed28 authored by Jameson Nash on 05 February 2024, 00:51:02 UTC, committed by GitHub on 05 February 2024, 00:51:02 UTC
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()`
1 parent 3d8b107
History
Tip revision: 8db129472ea88a9c5c4a6e94dff7b330723aed28 authored by Jameson Nash on 05 February 2024, 00:51:02 UTC
add atomic operators for globals, memory, and setonce (#52868)
Tip revision: 8db1294
File Mode Size
.devcontainer
.github
base
cli
contrib
deps
doc
etc
src
stdlib
test
.buildkite-external-version -rw-r--r-- 5 bytes
.clang-format -rw-r--r-- 3.3 KB
.clangd -rw-r--r-- 114 bytes
.codecov.yml -rw-r--r-- 52 bytes
.git-blame-ignore-revs -rw-r--r-- 371 bytes
.gitattributes -rw-r--r-- 65 bytes
.gitignore -rw-r--r-- 571 bytes
.mailmap -rw-r--r-- 12.7 KB
CITATION.bib -rw-r--r-- 513 bytes
CITATION.cff -rw-r--r-- 940 bytes
CONTRIBUTING.md -rw-r--r-- 23.4 KB
HISTORY.md -rw-r--r-- 372.8 KB
LICENSE.md -rw-r--r-- 1.3 KB
Make.inc -rw-r--r-- 55.9 KB
Makefile -rw-r--r-- 30.2 KB
NEWS.md -rw-r--r-- 11.4 KB
README.md -rw-r--r-- 7.4 KB
THIRDPARTY.md -rw-r--r-- 3.9 KB
VERSION -rw-r--r-- 11 bytes
julia.spdx.json -rw-r--r-- 37.8 KB
pkgimage.mk -rw-r--r-- 5.9 KB
sysimage.mk -rw-r--r-- 4.2 KB
typos.toml -rw-r--r-- 78 bytes

README.md

back to top