mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-08 14:20:07 +00:00
htl: Fix comparing attr with default values
Fortunately we were previously only missing an optimization. Thanks dcb <dcb314@hotmail.com> for the report [BZ #23032] * sysdeps/htl/pt-barrier-init.c (pthread_barrier_init): Fix comparing attr with __pthread_default_barrierattr. * sysdeps/htl/pt-cond-init.c (__pthread_cond_init): Fix comparing attr with __pthread_default_condattr. * sysdeps/htl/pt-mutex-init.c (_pthread_mutex_init): Fix comparing attr with __pthread_default_mutexattr. * sysdeps/htl/pt-rwlock-init.c (_pthread_rwlock_init): Fix comparing attr with __pthread_default_rwlockattr.
This commit is contained in:
parent
6310e6be9b
commit
fc493bc9e6
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
2018-12-01 Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||
|
||||
[BZ #23032]
|
||||
* sysdeps/htl/pt-barrier-init.c (pthread_barrier_init): Fix comparing
|
||||
attr with __pthread_default_barrierattr.
|
||||
* sysdeps/htl/pt-cond-init.c (__pthread_cond_init): Fix comparing
|
||||
attr with __pthread_default_condattr.
|
||||
* sysdeps/htl/pt-mutex-init.c (_pthread_mutex_init): Fix comparing
|
||||
attr with __pthread_default_mutexattr.
|
||||
* sysdeps/htl/pt-rwlock-init.c (_pthread_rwlock_init): Fix comparing
|
||||
attr with __pthread_default_rwlockattr.
|
||||
|
||||
2018-12-01 Kemi Wang <kemi.wang@intel.com>
|
||||
|
||||
* manual/tunables.texi (POSIX Thread Tunables): New node.
|
||||
|
@ -36,7 +36,7 @@ pthread_barrier_init (pthread_barrier_t *barrier,
|
||||
barrier->__count = count;
|
||||
|
||||
if (attr == NULL
|
||||
|| memcmp (attr, &__pthread_default_barrierattr, sizeof (*attr) == 0))
|
||||
|| memcmp (attr, &__pthread_default_barrierattr, sizeof (*attr)) == 0)
|
||||
/* Use the default attributes. */
|
||||
return 0;
|
||||
|
||||
|
@ -28,7 +28,7 @@ __pthread_cond_init (pthread_cond_t *cond, const pthread_condattr_t * attr)
|
||||
*cond = (pthread_cond_t) __PTHREAD_COND_INITIALIZER;
|
||||
|
||||
if (attr == NULL
|
||||
|| memcmp (attr, &__pthread_default_condattr, sizeof (*attr) == 0))
|
||||
|| memcmp (attr, &__pthread_default_condattr, sizeof (*attr)) == 0)
|
||||
/* Use the default attributes. */
|
||||
return 0;
|
||||
|
||||
|
@ -29,7 +29,7 @@ _pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)
|
||||
*mutex = (pthread_mutex_t) __PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
if (attr == NULL
|
||||
|| memcmp (attr, &__pthread_default_mutexattr, sizeof (*attr) == 0))
|
||||
|| memcmp (attr, &__pthread_default_mutexattr, sizeof (*attr)) == 0)
|
||||
/* The default attributes. */
|
||||
return 0;
|
||||
|
||||
|
@ -27,7 +27,7 @@ _pthread_rwlock_init (pthread_rwlock_t *rwlock,
|
||||
*rwlock = (pthread_rwlock_t) __PTHREAD_RWLOCK_INITIALIZER;
|
||||
|
||||
if (attr == NULL
|
||||
|| memcmp (attr, &__pthread_default_rwlockattr, sizeof (*attr) == 0))
|
||||
|| memcmp (attr, &__pthread_default_rwlockattr, sizeof (*attr)) == 0)
|
||||
/* Use the default attributes. */
|
||||
return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user