1
0
mirror of https://github.com/janet-lang/janet synced 2025-12-17 05:58:06 +00:00

Add support for atomic loads in Janet's atomic abstraction.

This commit is contained in:
Calvin Rose
2023-10-21 10:40:57 -05:00
parent e74365fe38
commit 609b629c22
3 changed files with 12 additions and 3 deletions

View File

@@ -647,6 +647,7 @@ typedef int32_t JanetAtomicInt;
#endif
JANET_API JanetAtomicInt janet_atomic_inc(JanetAtomicInt volatile *x);
JANET_API JanetAtomicInt janet_atomic_dec(JanetAtomicInt volatile *x);
JANET_API JanetAtomicInt janet_atomic_load(JanetAtomicInt volatile *x);
/* We provide three possible implementations of Janets. The preferred
* nanboxing approach, for 32 or 64 bits, and the standard C version. Code in the rest of the