From 8b1978c30ca6234e06596ef51fd68d98fcfa6aed Mon Sep 17 00:00:00 2001 From: Robert Collins Date: Fri, 20 Sep 2002 23:46:12 +0000 Subject: 2002-09-21 Robert Collins * thread.cc: Change verifyable_object_isvalid calls with PTHREAD_CONDATTR_MAGIC, PTHREAD_MUTEXATTR_MAGIC, PTHREAD_COND_MAGIC, SEM_MAGIC to objecttype::isGoodObject() calls throughout. (pthread_condattr::isGoodObject): Implement. (pthread_mutex::isGoodInitializer): Implement. (pthread_mutex::isGoodInitializerOrObject): Minor bugfix in the check for verifyable_object_isvalid result. (pthread_mutexattr::isGoodObject): Implement. (pthread_cond::isGoodObject): Ditto. (pthread_cond::isGoodInitializer): Ditto. (pthread_cond::isGoodInitializerOrObject): Ditto. (semaphore::isGoodObject): Ditto. * thread.h (pthread_mutex::isGoodInitializer): Declare. (pthread_condattr::isGoodObject): Ditto. (pthread_cond::isGoodObject): Const correctness. (pthread_cond::isGoodInitializer): Declare. (pthread_cond::isGoodInitializerOrObject): Ditto. (semaphore::isGoodObject): Const correctness. --- winsup/cygwin/thread.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/thread.h') diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/thread.h index 9238153ea..ad4208f5d 100644 --- a/winsup/cygwin/thread.h +++ b/winsup/cygwin/thread.h @@ -254,6 +254,7 @@ class pthread_mutex:public verifyable_object { public: static bool isGoodObject(pthread_mutex_t const *); + static bool isGoodInitializer(pthread_mutex_t const *); static bool isGoodInitializerOrObject(pthread_mutex_t const *); CRITICAL_SECTION criticalsection; HANDLE win32_obj_id; @@ -361,7 +362,7 @@ class pthreadNull : public pthread class pthread_condattr:public verifyable_object { public: - static bool isGoodObject(pthread_condattr_t *); + static bool isGoodObject(pthread_condattr_t const *); int shared; pthread_condattr (); @@ -371,7 +372,9 @@ public: class pthread_cond:public verifyable_object { public: - static bool isGoodObject(pthread_cond_t *); + static bool isGoodObject(pthread_cond_t const *); + static bool isGoodInitializer(pthread_cond_t const *); + static bool isGoodInitializerOrObject(pthread_cond_t const *); int shared; LONG waiting; LONG ExitingWait; @@ -400,7 +403,7 @@ public: class semaphore:public verifyable_object { public: - static bool isGoodObject(semaphore **); + static bool isGoodObject(sem_t const *); HANDLE win32_obj_id; class semaphore * next; int shared; -- cgit v1.2.3