summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Allsopp <david.allsopp@metastack.com>2022-03-18 10:52:00 +0000
committerDavid Allsopp <david.allsopp@metastack.com>2022-03-22 11:33:36 +0000
commit650acfccfc2f09ef88f5acded0e04715e69d6d73 (patch)
tree32954cb0759fda020eae3b94550da7188a5742e1
parentd99d0bf6daad22e1512c1995e28d3438c57ffeec (diff)
downloadocaml-650acfccfc2f09ef88f5acded0e04715e69d6d73.tar.gz
Remove st_atfork
These parts of the runtime are never reached on Windows.
-rw-r--r--otherlibs/systhreads/st_pthreads.h8
-rw-r--r--otherlibs/systhreads/st_stubs.c2
2 files changed, 1 insertions, 9 deletions
diff --git a/otherlibs/systhreads/st_pthreads.h b/otherlibs/systhreads/st_pthreads.h
index 829026d7b4..6e78d6e24c 100644
--- a/otherlibs/systhreads/st_pthreads.h
+++ b/otherlibs/systhreads/st_pthreads.h
@@ -298,11 +298,3 @@ static void * caml_thread_tick(void * arg)
}
return NULL;
}
-
-/* "At fork" processing */
-
-static int st_atfork(void (*fn)(void))
-{
- caml_atfork_hook = fn;
- return 0;
-}
diff --git a/otherlibs/systhreads/st_stubs.c b/otherlibs/systhreads/st_stubs.c
index 8f794529e5..bf2b4e8c92 100644
--- a/otherlibs/systhreads/st_stubs.c
+++ b/otherlibs/systhreads/st_stubs.c
@@ -413,7 +413,7 @@ CAMLprim value caml_thread_initialize(value unit)
caml_domain_external_interrupt_hook = caml_thread_interrupt_hook;
caml_domain_stop_hook = caml_thread_domain_stop_hook;
- st_atfork(caml_thread_reinitialize);
+ caml_atfork_hook = caml_thread_reinitialize;
CAMLreturn(Val_unit);
}