diff options
author | marcus <marcus> | 2004-03-23 03:43:49 +0000 |
---|---|---|
committer | marcus <marcus> | 2004-03-23 03:43:49 +0000 |
commit | e4d6bfccf8219e41513c318a3972b280084125b3 (patch) | |
tree | 5408a63b056059e96851a2591a9680c80959f4e3 /libpthread | |
parent | 0a29f873de888f818b902021c38d6169d9509636 (diff) |
2004-03-23 Marcus Brinkmann <marcus@gnu.org>
* sysdeps/generic/bits/mutex.h (__PTHREAD_MUTEX_INITIALIZER):
Remove compound statement.
(pthread_mutex_init): Use compound statement with initializer.
* pthread/pt-alloc.c (initialize_pthread): Likewise.
* sysdeps/generic/pt-mutex-init.c (_pthread_mutex_init): Likewise.
Diffstat (limited to 'libpthread')
-rw-r--r-- | libpthread/ChangeLog | 8 | ||||
-rw-r--r-- | libpthread/pthread/pt-alloc.c | 2 | ||||
-rw-r--r-- | libpthread/sysdeps/generic/bits/mutex.h | 5 | ||||
-rw-r--r-- | libpthread/sysdeps/generic/pt-mutex-init.c | 2 |
4 files changed, 12 insertions, 5 deletions
diff --git a/libpthread/ChangeLog b/libpthread/ChangeLog index fe54b85..25fcd33 100644 --- a/libpthread/ChangeLog +++ b/libpthread/ChangeLog @@ -1,3 +1,11 @@ +2004-03-23 Marcus Brinkmann <marcus@gnu.org> + + * sysdeps/generic/bits/mutex.h (__PTHREAD_MUTEX_INITIALIZER): + Remove compound statement. + (pthread_mutex_init): Use compound statement with initializer. + * pthread/pt-alloc.c (initialize_pthread): Likewise. + * sysdeps/generic/pt-mutex-init.c (_pthread_mutex_init): Likewise. + 2004-03-19 Marcus Brinkmann <marcus@gnu.org> * sysdeps/l4/bits/pthread-np.h (pthread_pool_add_np, diff --git a/libpthread/pthread/pt-alloc.c b/libpthread/pthread/pt-alloc.c index 5cdc85d..7c15fe1 100644 --- a/libpthread/pthread/pt-alloc.c +++ b/libpthread/pthread/pt-alloc.c @@ -69,7 +69,7 @@ initialize_pthread (struct __pthread *new, int recycling) new->stack = 0; - new->state_lock = PTHREAD_MUTEX_INITIALIZER; + new->state_lock = (struct __pthread_mutex) PTHREAD_MUTEX_INITIALIZER; new->state_cond = PTHREAD_COND_INITIALIZER; new->cancelation_handlers = 0; diff --git a/libpthread/sysdeps/generic/bits/mutex.h b/libpthread/sysdeps/generic/bits/mutex.h index 2baf040..ecbcff8 100644 --- a/libpthread/sysdeps/generic/bits/mutex.h +++ b/libpthread/sysdeps/generic/bits/mutex.h @@ -52,9 +52,8 @@ struct __pthread_mutex /* Initializer for a mutex. N.B. this also happens to be compatible with the cthread mutex initializer. */ # define __PTHREAD_MUTEX_INITIALIZER \ - ((struct __pthread_mutex) \ { __SPIN_LOCK_INITIALIZER, __SPIN_LOCK_INITIALIZER, NULL, NULL, NULL, \ - NULL, 0, 0 }) + NULL, 0, 0 } # endif #endif /* Not __pthread_mutex_defined. */ @@ -80,7 +79,7 @@ pthread_mutex_init (struct __pthread_mutex *__mutex, if (attr) return _pthread_mutex_init (__mutex, attr); - *__mutex = __PTHREAD_MUTEX_INITIALIZER; + *__mutex = (struct __pthread_mutex) __PTHREAD_MUTEX_INITIALIZER; return 0; } diff --git a/libpthread/sysdeps/generic/pt-mutex-init.c b/libpthread/sysdeps/generic/pt-mutex-init.c index 2902f6e..100f485 100644 --- a/libpthread/sysdeps/generic/pt-mutex-init.c +++ b/libpthread/sysdeps/generic/pt-mutex-init.c @@ -28,7 +28,7 @@ int _pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr) { - *mutex = __PTHREAD_MUTEX_INITIALIZER; + *mutex = (struct __pthread_mutex) __PTHREAD_MUTEX_INITIALIZER; if (! attr || memcmp (attr, &__pthread_default_mutexattr, sizeof (*attr) == 0)) |