summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/mqueuecreatesupp.c
diff options
context:
space:
mode:
authorJennifer Averett <Jennifer.Averett@OARcorp.com>2000-01-05 17:08:56 +0000
committerJennifer Averett <Jennifer.Averett@OARcorp.com>2000-01-05 17:08:56 +0000
commite015106f689c33ecc17ed0df3784a58539f203a3 (patch)
tree6b5d6c226c7a6d9356883503e1000296c44c9d04 /cpukit/posix/src/mqueuecreatesupp.c
parentAdded mqueuetranslatereturncode.c. (diff)
downloadrtems-e015106f689c33ecc17ed0df3784a58539f203a3.tar.bz2
+ Changed to resonable default values for maxmsg and msgsize.
+ Added oflag tracking.
Diffstat (limited to '')
-rw-r--r--cpukit/posix/src/mqueuecreatesupp.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/cpukit/posix/src/mqueuecreatesupp.c b/cpukit/posix/src/mqueuecreatesupp.c
index 894b11d891..009a77900c 100644
--- a/cpukit/posix/src/mqueuecreatesupp.c
+++ b/cpukit/posix/src/mqueuecreatesupp.c
@@ -47,9 +47,16 @@ int _POSIX_Message_queue_Create_support(
_Thread_Disable_dispatch();
+ /*
+ * There is no real basis for the default values. They will work
+ * but were not compared against any existing implementation for
+ * compatibility. See README.mqueue for an example program we
+ * think will print out the defaults. Report anything you find with it.
+ */
+
if ( attr_ptr == NULL ) {
- attr.mq_maxmsg = 0; /* XXX */
- attr.mq_msgsize = 0; /* XXX */
+ attr.mq_maxmsg = 10;
+ attr.mq_msgsize = 16;
} else {
if ( attr_ptr->mq_maxmsg < 0 ){
_Thread_Enable_dispatch();
@@ -76,7 +83,7 @@ int _POSIX_Message_queue_Create_support(
if ( name ) {
- if( strlen(name) > PATH_MAX ) { /* XXX - Is strlen ok to use here ? */
+ if( strlen(name) > PATH_MAX ) { /* XXX - on non-null terminated name? */
_Thread_Enable_dispatch();
set_errno_and_return_minus_one( ENAMETOOLONG );
}
@@ -95,6 +102,7 @@ int _POSIX_Message_queue_Create_support(
}
the_mq->process_shared = pshared;
+ the_mq->oflag = oflag;
if ( name ) {
the_mq->named = TRUE;