diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2023-04-06 09:19:10 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2023-04-06 13:17:41 +0300 |
commit | 2b52c0c231c5b9abc9cb4e9b52bb3c4de2fd7f79 (patch) | |
tree | 2eea47f58a83723b6408cb94663d21833b30ac9e /pthread_support.c | |
parent | 30b3f419d3eea97ceda2465ea1ef0267752e2f5f (diff) | |
download | bdwgc-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 'pthread_support.c')
-rw-r--r-- | pthread_support.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pthread_support.c b/pthread_support.c index 1753fa89..6430f60b 100644 --- a/pthread_support.c +++ b/pthread_support.c @@ -832,7 +832,7 @@ GC_INNER GC_thread GC_lookup_thread(thread_id_t id) # endif for (p = GC_threads[THREAD_TABLE_INDEX(id)]; p != NULL; p = p -> tm.next) { - if (THREAD_ID_EQUAL(p -> id, id)) break; + if (EXPECT(THREAD_ID_EQUAL(p -> id, id), TRUE)) break; } return p; } |