diff options
| author | Luuk de Gram <luuk@degram.dev> | 2023-04-22 15:40:53 +0200 |
|---|---|---|
| committer | Luuk de Gram <luuk@degram.dev> | 2023-04-26 16:28:40 +0200 |
| commit | b19c258f045aa1653b4e38ba2ff96302d914eea2 (patch) | |
| tree | 581bb2724a6b27589fe7f9ce377aab68eb7fd58c /lib/std/Thread.zig | |
| parent | fd47eddc862b0a5bd90949fe21cf87a716c5464c (diff) | |
| download | zig-b19c258f045aa1653b4e38ba2ff96302d914eea2.tar.gz zig-b19c258f045aa1653b4e38ba2ff96302d914eea2.zip | |
wasm: implement `@atomicRmw`
Implements the lowering of the `@atomicRmw` builtin. Uses the atomic
opcodes when the cpu feature `atomics` is enabled. Otherwise lowers
it to regular instructions. For the operations that do not lower to
a direct atomic opcode, we use a loop in combiantion with a cmpxchg
to ensure the swapping of values is doing atomically.
Diffstat (limited to 'lib/std/Thread.zig')
0 files changed, 0 insertions, 0 deletions
