diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2022-09-22 08:04:07 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2022-09-22 14:05:27 +0300 |
commit | 3eb104fc78e27d88d3ff0f74651416ceb0a3bdce (patch) | |
tree | f6d3f7e93d842dd4fa66b4139a3afb0c07cc9219 /win32_threads.c | |
parent | ed52814448645759ac14b383969447bf239cc1f4 (diff) | |
download | bdwgc-3eb104fc78e27d88d3ff0f74651416ceb0a3bdce.tar.gz |
Fix loop condition over dll_thread_table in GC_lookup_pthread (Win32)
(fix of commit 2fe9e9d55)
Break the loop (over dll_thread_table elements) in GC_lookup_pthread
when pthread_id matches id (provided the element is in use).
* win32_threads.c [GC_PTHREADS && !GC_NO_THREADS_DISCOVERY]
(GC_lookup_pthread): Inverse THREAD_EQUAL() condition in for statement.
Diffstat (limited to 'win32_threads.c')
-rw-r--r-- | win32_threads.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/win32_threads.c b/win32_threads.c index 93afc47e..61e57ded 100644 --- a/win32_threads.c +++ b/win32_threads.c @@ -1078,7 +1078,7 @@ GC_API void * GC_CALL GC_get_my_stackbottom(struct GC_stack_base *sb) for (i = 0; i <= my_max && (!AO_load_acquire(&dll_thread_table[i].tm.in_use) - || THREAD_EQUAL(dll_thread_table[i].pthread_id, id)); + || !THREAD_EQUAL(dll_thread_table[i].pthread_id, id)); /* Must still be in_use, since nobody else can */ /* store our thread_id. */ i++) { |