diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-12-19 15:11:54 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-12-19 15:11:54 -0500 |
| commit | 88d1bde371ba6bec42952f7cce242afd41f524d9 (patch) | |
| tree | 05107286ad028ae22a4bbcef8a776e7115817c5f /stdlib | |
| parent | ef546696e825359ccfd865648eb0ca5cf87233f1 (diff) | |
RNG needs to not be thread-local to make GC happy
Diffstat (limited to 'stdlib')
| -rw-r--r-- | stdlib/rng.c | 2 | ||||
| -rw-r--r-- | stdlib/rng.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/stdlib/rng.c b/stdlib/rng.c index 9558f96b..c6bcfa5d 100644 --- a/stdlib/rng.c +++ b/stdlib/rng.c @@ -18,7 +18,7 @@ #include "chacha.h" -public _Thread_local RNG_t default_rng = NULL; +public RNG_t default_rng = NULL; struct RNGState_t { chacha_ctx chacha; diff --git a/stdlib/rng.h b/stdlib/rng.h index 5bc4794f..89b53505 100644 --- a/stdlib/rng.h +++ b/stdlib/rng.h @@ -26,6 +26,6 @@ Num_t RNG$num(RNG_t rng, Num_t min, Num_t max); Num32_t RNG$num32(RNG_t rng, Num32_t min, Num32_t max); extern const TypeInfo_t RNG$info; -extern _Thread_local RNG_t default_rng; +extern RNG_t default_rng; // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0 |
