summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2023-04-28 07:38:54 +0300
committerIvan Maidanski <ivmai@mail.ru>2023-04-28 10:43:35 +0300
commitf806e6209830db829a8d10be6c373a4866d402e3 (patch)
tree169ed41ce2f193976408abbae584570fc02bc7b8
parent026dde22e2194990d699446d9ce71ea6e19859ed (diff)
downloadbdwgc-f806e6209830db829a8d10be6c373a4866d402e3.tar.gz
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.
-rw-r--r--pthread_support.c4
1 files 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();