OSDN Git Service

* thread.cc (pthread_cond::init): Disable validity test of object
authorcorinna <corinna>
Wed, 22 Mar 2006 12:52:26 +0000 (12:52 +0000)
committercorinna <corinna>
Wed, 22 Mar 2006 12:52:26 +0000 (12:52 +0000)
to initialize since test of uninitialized content is unreliable.
(pthread_rwlock::init): Ditto.
(pthread_mutex::init): Ditto.

winsup/cygwin/ChangeLog
winsup/cygwin/thread.cc

index 62fc864..bb0d4b9 100644 (file)
@@ -1,3 +1,10 @@
+2006-03-22  Corinna Vinschen  <corinna@vinschen.de>
+
+       * thread.cc (pthread_cond::init): Disable validity test of object
+       to initialize since test of uninitialized content is unreliable.
+       (pthread_rwlock::init): Ditto.
+       (pthread_mutex::init): Ditto.
+
 2006-03-21  Christopher Faylor  <cgf@timesys.com>
 
        * signal.cc (signal): Don't set SA_RESTART here.
index d7b2a1f..7ae53d3 100644 (file)
@@ -2550,13 +2550,15 @@ pthread_cond::init (pthread_cond_t *cond, const pthread_condattr_t *attr)
     return EINVAL;
 
   cond_initialization_lock.lock ();
-
+#if 0
+  /* Disabled since recognition of a valid object doesn't work reliably
+     if the object is uninitialized. */
   if (!is_good_initializer_or_bad_object (cond))
     {
       cond_initialization_lock.unlock ();
       return EBUSY;
     }
-
+#endif
   new_cond = new pthread_cond (attr ? (*attr) : NULL);
   if (!is_good_object (&new_cond))
     {
@@ -2731,13 +2733,15 @@ pthread_rwlock::init (pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr
     return EINVAL;
 
   rwlock_initialization_lock.lock ();
-
+#if 0
+  /* Disabled since recognition of a valid object doesn't work reliably
+     if the object is uninitialized. */
   if (!is_good_initializer_or_bad_object (rwlock))
     {
       rwlock_initialization_lock.unlock ();
       return EBUSY;
     }
-
+#endif
   new_rwlock = new pthread_rwlock (attr ? (*attr) : NULL);
   if (!is_good_object (&new_rwlock))
     {
@@ -2909,13 +2913,15 @@ pthread_mutex::init (pthread_mutex_t *mutex,
     return EINVAL;
 
   mutex_initialization_lock.lock ();
-
+#if 0
+  /* Disabled since recognition of a valid object doesn't work reliably
+     if the object is uninitialized. */
   if (!is_good_initializer_or_bad_object (mutex))
     {
       mutex_initialization_lock.unlock ();
       return EBUSY;
     }
-
+#endif
   new_mutex = new pthread_mutex (attr ? (*attr) : NULL);
   if (!is_good_object (&new_mutex))
     {