Skip to content

Commit

Permalink
perf TLS: inline
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Oct 27, 2023
1 parent e67bffe commit aa7906e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/thread_local_storage.real.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit aa7906e

Please sign in to comment.