summaryrefslogtreecommitdiffstats
path: root/c/src/exec/posix/src/cond.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-05-31 21:40:48 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-05-31 21:40:48 +0000
commitc238a2189d15121d62faa56982cbf17f22bd5b3e (patch)
tree9c097b85d04b69cc2e11d1549f1e2349f3cd1459 /c/src/exec/posix/src/cond.c
parentfixed typo in merge of Eric Norum's patch (diff)
downloadrtems-c238a2189d15121d62faa56982cbf17f22bd5b3e.tar.bz2
added checks to validate values passed to set attribute routines
Diffstat (limited to 'c/src/exec/posix/src/cond.c')
-rw-r--r--c/src/exec/posix/src/cond.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/c/src/exec/posix/src/cond.c b/c/src/exec/posix/src/cond.c
index bba0f1991f..5dd5493808 100644
--- a/c/src/exec/posix/src/cond.c
+++ b/c/src/exec/posix/src/cond.c
@@ -142,8 +142,15 @@ int pthread_condattr_setpshared(
if ( !attr )
return EINVAL;
- attr->process_shared = pshared;
- return 0;
+ switch ( pshared ) {
+ case PTHREAD_PROCESS_SHARED:
+ case PTHREAD_PROCESS_PRIVATE:
+ attr->process_shared = pshared;
+ return 0;
+
+ default:
+ return EINVAL;
+ }
}
/*PAGE