From 88d1bde371ba6bec42952f7cce242afd41f524d9 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 19 Dec 2024 15:11:54 -0500 Subject: RNG needs to not be thread-local to make GC happy --- stdlib/rng.c | 2 +- stdlib/rng.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'stdlib') 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 -- cgit v1.2.3