diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2012-04-08 17:12:46 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2012-04-08 17:12:46 +0000 |
commit | 0d2e9941ebfbfcaaf28eae3e21dd7a8d35fdbb91 (patch) | |
tree | 60901ba17e6bfeea06a1cea6cbc700e463c6351f | |
parent | 715ea44322710dfb69537770b5cefb6e63ee9cad (diff) |
PR#5295: OS threads: problem with caml_c_thread_unregister()
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12325 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | otherlibs/systhreads/st_stubs.c | 5 |
2 files changed, 5 insertions, 1 deletions
@@ -88,6 +88,7 @@ Bug Fixes: - PR#5211: updated Genlex documentation to state that camlp4 is mandatory for 'parser' keyword and associated notation - PR#5238, PR#5277: Sys_error when getting error location +- PR#5295: OS threads: problem with caml_c_thread_unregister() - PR#5301: camlp4r and exception equal to another one with parameters - PR#5309: Queue.add is not thread/signal safe - PR#5310: Ratio.create_ratio/create_normalized_ratio have misleading names diff --git a/otherlibs/systhreads/st_stubs.c b/otherlibs/systhreads/st_stubs.c index ba10205eb..9b2493a16 100644 --- a/otherlibs/systhreads/st_stubs.c +++ b/otherlibs/systhreads/st_stubs.c @@ -344,7 +344,10 @@ static value caml_thread_new_descriptor(value clos) static void caml_thread_remove_info(caml_thread_t th) { - if (th->next == th) all_threads = NULL; /* last OCaml thread exiting */ + if (th->next == th) + all_threads = NULL; /* last OCaml thread exiting */ + else if (all_threads == th) + all_threads = th->next; /* PR#5295 */ th->next->prev = th->prev; th->prev->next = th->next; #ifndef NATIVE_CODE |