summaryrefslogtreecommitdiff
path: root/runtime/fail_byt.c
diff options
context:
space:
mode:
authorStephen Dolan <sdolan@janestreet.com>2020-07-27 16:12:10 +0100
committerStephen Dolan <sdolan@janestreet.com>2020-07-28 10:54:54 +0100
commit15b9d006a4792c88d0c461e8280d932364cb1404 (patch)
tree2e658889495befb3de79b9eea22ecca8719a5a42 /runtime/fail_byt.c
parent63d516bda140ea7524523c62038e1f6d4ca004aa (diff)
downloadocaml-15b9d006a4792c88d0c461e8280d932364cb1404.tar.gz
Avoid polling in caml_leave_blocking_section
To preserve behaviour, explicit polls are added: - in caml_raise, to raise the right exception when as system call is interrupted by a signal. - in sigprocmask, to ensure that signals are handled as soon as they are unmasked.
Diffstat (limited to 'runtime/fail_byt.c')
-rw-r--r--runtime/fail_byt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/fail_byt.c b/runtime/fail_byt.c
index b2e8d8b78f..389a23047d 100644
--- a/runtime/fail_byt.c
+++ b/runtime/fail_byt.c
@@ -34,6 +34,8 @@
CAMLexport void caml_raise(value v)
{
Unlock_exn();
+ CAMLassert(!Is_exception_result(v));
+ v = caml_process_pending_actions_with_root(v);
Caml_state->exn_bucket = v;
if (Caml_state->external_raise == NULL) caml_fatal_uncaught_exception(v);
siglongjmp(Caml_state->external_raise->buf, 1);