diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2002-04-15 14:39:44 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2002-04-15 14:39:44 +0000 |
commit | c716acb5be8d6cfa46f0d8dc058800d62c048516 (patch) | |
tree | 5496cb011381d79b167efdbd175070eb93a0c1c8 | |
parent | 372311489141f37cdb715e438b184f28354a57dd (diff) |
Cas particulier Win32 dans leave_blocking_section qui cassait la bibliotheque de threads
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4663 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | byterun/signals.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/byterun/signals.c b/byterun/signals.c index 727b87aff..6fce2115a 100644 --- a/byterun/signals.c +++ b/byterun/signals.c @@ -134,16 +134,20 @@ CAMLexport void enter_blocking_section(void) CAMLexport void leave_blocking_section(void) { #ifdef _WIN32 + int signal_number; +#endif + + if (leave_blocking_section_hook != NULL) leave_blocking_section_hook(); +#ifdef _WIN32 /* Under Win32, asynchronous signals such as ctrl-C are not processed immediately (see ctrl_handler in win32.c), but simply set pending_signal and let the system call run to completion. Hence, test pending_signal here and act upon it, before we get a chance to process the result of the system call. */ - int signal_number = pending_signal; + signal_number = pending_signal; pending_signal = 0; if (signal_number) execute_signal(signal_number, 1); #endif - if (leave_blocking_section_hook != NULL) leave_blocking_section_hook(); Assert(async_signal_mode); async_signal_mode = 0; } |