* 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.
This commit is contained in:
Corinna Vinschen 2006-03-22 12:52:26 +00:00
parent b40d2db7b0
commit 69769b7cb5
2 changed files with 19 additions and 6 deletions

View 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.

View 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))
{