From f806e6209830db829a8d10be6c373a4866d402e3 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 28 Apr 2023 07:38:54 +0300 Subject: Use THREAD_ID_EQUAL() to compare thread_id_t values (fix of commits 4240cfb99, 68d419a51) * pthread_support.c [!DONT_USE_ATEXIT] (GC_is_main_thread): Use THREAD_ID_EQUAL() to compare GC_main_thread_id value. * pthread_support.c [!GC_NO_THREADS_DISCOVERY && GC_WIN32_THREADS] (GC_unregister_my_thread): Likewise. --- pthread_support.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pthread_support.c b/pthread_support.c index c1232cef..c52394aa 100644 --- a/pthread_support.c +++ b/pthread_support.c @@ -1530,7 +1530,7 @@ GC_INNER_WIN32THREAD void GC_record_stack_base(GC_stack_context_t crtn, GC_INNER GC_bool GC_is_main_thread(void) { GC_ASSERT(GC_thr_initialized); - return thread_id_self() == GC_main_thread_id; + return THREAD_ID_EQUAL(GC_main_thread_id, thread_id_self()); } #endif /* !DONT_USE_ATEXIT */ @@ -2106,7 +2106,7 @@ GC_API int GC_CALL GC_unregister_my_thread(void) /* is registered by DllMain, except for the main thread. */ # if !defined(GC_NO_THREADS_DISCOVERY) && defined(GC_WIN32_THREADS) GC_ASSERT(!GC_win32_dll_threads - || GC_main_thread_id == thread_id_self()); + || THREAD_ID_EQUAL(GC_main_thread_id, thread_id_self())); # endif LOCK(); -- cgit v1.2.1