Skip to content

Commit ff9a0d1

Browse files
authored
flambda-backend: Bugfix for caml_switch_runtime_locking_scheme (#1429)
1 parent df41dae commit ff9a0d1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

otherlibs/systhreads/st_stubs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,6 +880,8 @@ CAMLprim value caml_thread_yield(value unit) /* ML */
880880
caml_raise_async_if_exception(caml_process_pending_signals_exn(),
881881
"signal handler");
882882
caml_thread_save_runtime_state();
883+
/* caml_locking_scheme may have changed in caml_process_pending_signals_exn */
884+
s = atomic_load(&caml_locking_scheme);
883885
s->yield(s->context);
884886
if (atomic_load(&caml_locking_scheme) != s) {
885887
/* The lock we have is no longer the runtime lock */

0 commit comments

Comments
 (0)