summaryrefslogtreecommitdiff
path: root/win32_threads.c
diff options
context:
space:
mode:
authorivmai <ivmai>2010-12-02 08:44:04 +0100
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:55 +0200
commitda518ec93509c607211f69d1ab0565fe0b663397 (patch)
treef4f570faadb55ccd9e006953c0e5f051722a55dc /win32_threads.c
parent639fb53a03c4620aa199252fff279251daf3d6db (diff)
2010-12-02 Ivan Maidanski <ivmai@mail.ru>
* allchblk.c (GC_freehblk): Print extended error message (done via GC_printf() before aborting with a short message) only if GC_print_stats. * dyn_load.c (GC_register_dynamic_libraries): Ditto. * os_dep.c (GC_get_maps, GC_register_data_segments, GC_remap, PROTECT, GC_write_fault_handler, GC_mprotect_thread): Ditto. * pthread_stop_world.c (GC_start_world): Ditto. * win32_threads.c (GC_register_my_thread_inner): Ditto. * os_dep.c (GC_get_main_stack_base, GC_register_data_segments, GC_dirty_init): Remove redundant print of an error message before aborting with the same message. * os_dep.c (GC_register_data_segments): Remove format specifier from the string passed to GC_err_puts(); use ABORT instead of EXIT (if invalid executable type). * os_dep.c (GC_remap): Adjust printf format specifier (for long type). * os_dep.c (GC_dirty_init): Print a message about SIG_IGN detected (for SIGSEGV/BUS) only if GC_print_stats. * os_dep.c (catch_exception_raise): Join 2 adjucent GC_err_printf calls.
Diffstat (limited to 'win32_threads.c')
-rw-r--r--win32_threads.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/win32_threads.c b/win32_threads.c
index 9e0876e..c7dd600 100644
--- a/win32_threads.c
+++ b/win32_threads.c
@@ -461,7 +461,9 @@ STATIC GC_thread GC_register_my_thread_inner(const struct GC_stack_base *sb,
(HANDLE*)&(me -> handle),
0 /* dwDesiredAccess */, FALSE /* bInheritHandle */,
DUPLICATE_SAME_ACCESS)) {
- GC_err_printf("Last error code: %d\n", (int)GetLastError());
+ if (GC_print_stats)
+ GC_printf("DuplicateHandle failed with error code: %d\n",
+ (int)GetLastError());
ABORT("DuplicateHandle failed");
}
# endif