summaryrefslogtreecommitdiff
path: root/win32_threads.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-05-10 14:53:40 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:58 +0200
commitec6effaa02f0fa4a35d6238bdb408226a3d4ab19 (patch)
tree78e756776c1f539b9548762640fec02dce76b5c3 /win32_threads.c
parent14d27241d27d161c1b1057e7a50af5aa0cf466c2 (diff)
2011-05-10 Ivan Maidanski <ivmai@mail.ru>
* pthread_support.c (GC_unregister_my_thread): Call pthread_self only once. * win32_threads.c (GC_pthread_start_inner): Ditto. * pthread_support.c (GC_unregister_my_thread): Add debug output. * win32_threads.c (GC_unregister_my_thread): Ditto. * pthread_support.c (GC_register_my_thread, GC_start_rtn_prepare_thread): Rename "my_pthread" local variable to "self".
Diffstat (limited to 'win32_threads.c')
-rw-r--r--win32_threads.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/win32_threads.c b/win32_threads.c
index 026f162..33227ca 100644
--- a/win32_threads.c
+++ b/win32_threads.c
@@ -729,6 +729,10 @@ GC_API int GC_CALL GC_unregister_my_thread(void)
{
DCL_LOCK_STATE;
+# ifdef DEBUG_THREADS
+ GC_log_printf("Unregistering thread 0x%lx\n", (long)GetCurrentThreadId());
+# endif
+
/* FIXME: is GC_wait_for_gc_completion(FALSE) needed here? */
if (GC_win32_dll_threads) {
# if defined(THREAD_LOCAL_ALLOC)
@@ -2448,9 +2452,8 @@ GC_INNER void GC_thr_init(void)
pthread_cleanup_pop(1);
# ifdef DEBUG_THREADS
- GC_log_printf("thread %p(0x%lx) returned from start routine\n",
- GC_PTHREAD_PTRVAL(pthread_self()),
- (long)GetCurrentThreadId());
+ GC_log_printf("thread %p(0x%x) returned from start routine\n",
+ GC_PTHREAD_PTRVAL(pthread_id), (int)thread_id);
# endif
return(result);
}