From d2298ecbc9910e9186dad3eeb7fa8eed7bca9a80 Mon Sep 17 00:00:00 2001 From: rpj Date: Sat, 25 Jul 1998 15:46:04 +0000 Subject: Sun Jul 26 00:09:59 1998 Ross Johnson * sync.c: Rename all instances of _pthread_count_mutex to _pthread_table_mutex. * implement.h: Rename _pthread_count_mutex to _pthread_table_mutex. * global.c: Rename _pthread_count_mutex to _pthread_table_mutex. * create.c (pthread_create): Add critical sections. (_pthread_start_call): Rename _pthread_count_mutex to _pthread_table_mutex. --- sync.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sync.c') diff --git a/sync.c b/sync.c index 721574e..7483598 100644 --- a/sync.c +++ b/sync.c @@ -76,7 +76,7 @@ pthread_join(pthread_t thread, void ** valueptr) target_thread_mutex = _PTHREAD_THREAD_MUTEX(target); /* CRITICAL SECTION */ - pthread_mutex_lock(&_pthread_count_mutex); + pthread_mutex_lock(&_pthread_table_mutex); /* If the thread is in DETACHED state, then join will return immediately. */ @@ -89,7 +89,7 @@ pthread_join(pthread_t thread, void ** valueptr) target->join_count++; - pthread_mutex_lock(&_pthread_count_mutex); + pthread_mutex_lock(&_pthread_table_mutex); /* END CRITICAL SECTION */ /* CANCELATION POINT */ @@ -116,7 +116,7 @@ pthread_join(pthread_t thread, void ** valueptr) following critical section. */ /* CRITICAL SECTION */ - pthread_mutex_lock(&_pthread_count_mutex); + pthread_mutex_lock(&_pthread_table_mutex); /* Collect the value pointer passed to pthread_exit(). If another thread detaches our target thread while we're @@ -144,7 +144,7 @@ pthread_join(pthread_t thread, void ** valueptr) _pthread_delete_thread_entry(target); } - pthread_mutex_lock(&_pthread_count_mutex); + pthread_mutex_lock(&_pthread_table_mutex); /* END CRITICAL SECTION */ return ret; @@ -163,7 +163,7 @@ pthread_detach(pthread_t thread) pthread_mutex_t * target_thread_mutex; /* CRITICAL SECTION */ - pthread_mutex_lock(&_pthread_count_mutex); + pthread_mutex_lock(&_pthread_table_mutex); target = _pthread_find_thread_entry(thread); @@ -195,7 +195,7 @@ pthread_detach(pthread_t thread) } } - pthread_mutex_unlock(&_pthread_count_mutex); + pthread_mutex_unlock(&_pthread_table_mutex); /* END CRITICAL SECTION */ return ret; -- cgit v1.2.3