perf TLS: inline

This commit is contained in:
Simon Cruanes 2023-10-27 16:05:43 -04:00
parent e67bffeca5
commit aa7906eb2c
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -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