From aa7906eb2cef9a2b8df5cd52dd10c5e496a49f91 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Fri, 27 Oct 2023 16:05:43 -0400 Subject: [PATCH] perf TLS: inline --- src/thread_local_storage.real.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/thread_local_storage.real.ml b/src/thread_local_storage.real.ml index 2d33f62c..250982ee 100644 --- a/src/thread_local_storage.real.ml +++ b/src/thread_local_storage.real.ml @@ -14,7 +14,7 @@ type 'a key = { let counter = Atomic.make 0 (** Value used to detect a TLS slot that was not initialized yet *) -let sentinel_value_for_uninit_tls_ () : Obj.t = Obj.repr counter +let[@inline] sentinel_value_for_uninit_tls_ () : Obj.t = Obj.repr counter let new_key compute : _ key = let index = Atomic.fetch_and_add counter 1 in