summaryrefslogtreecommitdiff
path: root/specific.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2018-04-20 00:32:14 +0300
committerIvan Maidanski <ivmai@mail.ru>2018-04-20 00:32:14 +0300
commit2abae9a5c72604456138057e48976a79a618e87d (patch)
treefea224439c0365ed3ee40ee300ad46c3ba298140 /specific.c
parent64c232aa7b741945e8e9c073fa718c04d2199e9d (diff)
downloadbdwgc-2abae9a5c72604456138057e48976a79a618e87d.tar.gz
Use THREAD_EQUAL consistently to compare pthread_t values
(code refactoring) * pthread_stop_world.c [GC_ENABLE_SUSPEND_THREAD] (GC_suspend_thread): Use THREAD_EQUAL() to compare pthread_t values. * pthread_support.c (GC_unregister_my_thread): Likewise. * specific.c [USE_CUSTOM_SPECIFIC] (GC_remove_specific_after_fork, GC_slow_getspecific): Likewise.
Diffstat (limited to 'specific.c')
-rw-r--r--specific.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/specific.c b/specific.c
index 0ded0360..954b2156 100644
--- a/specific.c
+++ b/specific.c
@@ -91,7 +91,7 @@ GC_INNER void GC_remove_specific_after_fork(tsd * key, pthread_t t)
# endif
pthread_mutex_lock(&(key -> lock));
entry = *link;
- while (entry != NULL && entry -> thread != t) {
+ while (entry != NULL && !THREAD_EQUAL(entry->thread, t)) {
link = &(entry -> next);
entry = *link;
}
@@ -132,7 +132,7 @@ GC_INNER void * GC_slow_getspecific(tsd * key, word qtid,
tse *entry = key->hash[hash_val].p;
GC_ASSERT(qtid != INVALID_QTID);
- while (entry != NULL && entry -> thread != self) {
+ while (entry != NULL && !THREAD_EQUAL(entry->thread, self)) {
entry = entry -> next;
}
if (entry == NULL) return NULL;