summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-14 14:52:30 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-14 14:52:30 +0000
commitcb603903a2db32ac498afc959c6117d2967ec706 (patch)
treec3abc44fea3c695ae095d1aae5827b6a5daad73c
parenteb3f1bc10742ee454e4ac5fd4e3bb732f9ee17a2 (diff)
2007-09-14 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1261/cpukit * src/semaphorecreatesupp.c: Initialize all fields during semaphore creation.
-rw-r--r--cpukit/posix/ChangeLog6
-rw-r--r--cpukit/posix/src/semaphorecreatesupp.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/cpukit/posix/ChangeLog b/cpukit/posix/ChangeLog
index d139fc86ae..1d0567ea81 100644
--- a/cpukit/posix/ChangeLog
+++ b/cpukit/posix/ChangeLog
@@ -1,5 +1,11 @@
2007-09-14 Joel Sherrill <joel.sherrill@OARcorp.com>
+ PR 1261/cpukit
+ * src/semaphorecreatesupp.c: Initialize all fields during
+ semaphore creation.
+
+2007-09-14 Joel Sherrill <joel.sherrill@OARcorp.com>
+
PR 1260/cpukit
* src/pthread.c: Get initial signals blocked from creating thread
not from ourselves.
diff --git a/cpukit/posix/src/semaphorecreatesupp.c b/cpukit/posix/src/semaphorecreatesupp.c
index 86b1179660..32828bb111 100644
--- a/cpukit/posix/src/semaphorecreatesupp.c
+++ b/cpukit/posix/src/semaphorecreatesupp.c
@@ -78,9 +78,11 @@ int _POSIX_Semaphore_Create_support(
the_semaphore->named = TRUE;
the_semaphore->open_count = 1;
the_semaphore->linked = TRUE;
- }
- else
+ } else {
the_semaphore->named = FALSE;
+ the_semaphore->open_count = 0;
+ the_semaphore->linked = FALSE;
+ }
the_sem_attr = &the_semaphore->Semaphore.Attributes;