summaryrefslogtreecommitdiff
path: root/win32_threads.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2023-04-06 09:19:10 +0300
committerIvan Maidanski <ivmai@mail.ru>2023-04-06 13:17:41 +0300
commit2b52c0c231c5b9abc9cb4e9b52bb3c4de2fd7f79 (patch)
tree2eea47f58a83723b6408cb94663d21833b30ac9e /win32_threads.c
parent30b3f419d3eea97ceda2465ea1ef0267752e2f5f (diff)
downloadbdwgc-2b52c0c231c5b9abc9cb4e9b52bb3c4de2fd7f79.tar.gz
Use EXPECT() in GC_lookup_thread and GC_lookup_by_pthread
(refactoring) * pthread_support.c (GC_lookup_thread): Expect break on the first iteration of the loop. * win32_threads.c [GC_PTHREADS] (GC_lookup_by_pthread): Expect return on the first iteration of the first loop.
Diffstat (limited to 'win32_threads.c')
-rw-r--r--win32_threads.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win32_threads.c b/win32_threads.c
index 89c690ba..5ee873d1 100644
--- a/win32_threads.c
+++ b/win32_threads.c
@@ -353,7 +353,7 @@ GC_INLINE LONG GC_get_max_thread_index(void)
/* We first try the cache. */
for (p = GC_threads[THREAD_TABLE_INDEX(id)];
p != NULL; p = p -> tm.next) {
- if (THREAD_EQUAL(p -> pthread_id, thread))
+ if (EXPECT(THREAD_EQUAL(p -> pthread_id, thread), TRUE))
return p;
}