summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-14 14:53:00 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-14 14:53:00 +0000
commit622e09b4408d85ecf1a3d5c72041ef49f841e733 (patch)
tree3f52586accd23d01e15d589e07db20c7753694b8 /cpukit
parent2007-09-14 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-622e09b4408d85ecf1a3d5c72041ef49f841e733.tar.bz2
2007-09-14 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1261/cpukit * posix/src/semaphorecreatesupp.c: Initialize all fields during semaphore creation.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog6
-rw-r--r--cpukit/posix/src/semaphorecreatesupp.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index c660902d31..c51425bd9a 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,11 @@
2007-09-14 Joel Sherrill <joel.sherrill@OARcorp.com>
+ PR 1261/cpukit
+ * posix/src/semaphorecreatesupp.c: Initialize all fields during
+ semaphore creation.
+
+2007-09-14 Joel Sherrill <joel.sherrill@OARcorp.com>
+
PR 1260/cpukit
* posix/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 64d8f435b0..77c6924fe5 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;