summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2004-11-02 03:52:19 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-04-06 22:40:34 +0200
commita2102d6a91d6e4522471da3bbc3d58473400bfe7 (patch)
treebfc766ad2751f56817dc029318778db2d0bdcfaa
parent8765659aee80734a9d0a68a67c20c43a0d97eee4 (diff)
2004-11-02 Marcus Brinkmann <marcus@gnu.org>
* sysdeps/generic/bits/condition.h (__PTHREAD_COND_INITIALIZER): Remove compound statement. * pthread/pt-alloc.c (initialize_pthread): Use compound statement. * sysdeps/generic/pt-cond-init.c (pthread_cond_init): Likewise.
-rw-r--r--ChangeLog7
-rw-r--r--pthread/pt-alloc.c2
-rw-r--r--sysdeps/generic/bits/condition.h3
-rw-r--r--sysdeps/generic/pt-cond-init.c2
4 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index d9debc5..f4bd793 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-11-02 Marcus Brinkmann <marcus@gnu.org>
+
+ * sysdeps/generic/bits/condition.h (__PTHREAD_COND_INITIALIZER):
+ Remove compound statement.
+ * pthread/pt-alloc.c (initialize_pthread): Use compound statement.
+ * sysdeps/generic/pt-cond-init.c (pthread_cond_init): Likewise.
+
2004-11-01 Marcus Brinkmann <marcus@gnu.org>
* pthread/pt-create.c (__pthread_total): Change type to uatomic32_t.
diff --git a/pthread/pt-alloc.c b/pthread/pt-alloc.c
index dd9760d..615b728 100644
--- a/pthread/pt-alloc.c
+++ b/pthread/pt-alloc.c
@@ -70,7 +70,7 @@ initialize_pthread (struct __pthread *new, int recycling)
new->stack = 0;
new->state_lock = (struct __pthread_mutex) PTHREAD_MUTEX_INITIALIZER;
- new->state_cond = PTHREAD_COND_INITIALIZER;
+ new->state_cond = (struct __pthread_cond) PTHREAD_COND_INITIALIZER;
new->cancelation_handlers = 0;
diff --git a/sysdeps/generic/bits/condition.h b/sysdeps/generic/bits/condition.h
index cb7e935..a194b05 100644
--- a/sysdeps/generic/bits/condition.h
+++ b/sysdeps/generic/bits/condition.h
@@ -34,7 +34,6 @@ struct __pthread_cond
/* Initializer for a condition variable. */
#define __PTHREAD_COND_INITIALIZER \
- ((struct __pthread_cond) \
- { __SPIN_LOCK_INITIALIZER, NULL, NULL, NULL, NULL })
+ { __SPIN_LOCK_INITIALIZER, NULL, NULL, NULL, NULL }
#endif /* bits/condition.h */
diff --git a/sysdeps/generic/pt-cond-init.c b/sysdeps/generic/pt-cond-init.c
index 4afcc94..a01a94b 100644
--- a/sysdeps/generic/pt-cond-init.c
+++ b/sysdeps/generic/pt-cond-init.c
@@ -29,6 +29,6 @@ pthread_cond_init (pthread_cond_t *cond,
if (attr)
assert (attr->pshared == PTHREAD_PROCESS_PRIVATE);
- *cond = __PTHREAD_COND_INITIALIZER;
+ *cond = (struct __pthread_cond) __PTHREAD_COND_INITIALIZER;
return 0;
}