Skip to content

Commit

Permalink
Merge pull request ocaml-multicore#754 from talex5/quiet-tsan
Browse files Browse the repository at this point in the history
eio_linux: avoid triggering a TSan warning
  • Loading branch information
talex5 authored Sep 7, 2024
2 parents e2dc1d7 + 9ca440a commit 534f89c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib_eio_linux/sched.ml
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,10 @@ let with_sched ?(fallback=no_fallback) config fn =
Uring.exit uring;
fallback (`Msg "Linux >= 5.15 is required for io_uring support")
) else (
statx_works := Uring.op_supported probe Uring.Op.msg_ring;
(* The reason for an if here is to make sure we only set it once, when
the first domain is starting. This is just to avoid a tsan warning. *)
if not !statx_works && Uring.op_supported probe Uring.Op.msg_ring then
statx_works := true;
match
let mem =
let fixed_buf_len = block_size * n_blocks in
Expand Down

0 comments on commit 534f89c

Please sign in to comment.