From e015106f689c33ecc17ed0df3784a58539f203a3 Mon Sep 17 00:00:00 2001 From: Jennifer Averett Date: Wed, 5 Jan 2000 17:08:56 +0000 Subject: + Changed to resonable default values for maxmsg and msgsize. + Added oflag tracking. --- cpukit/posix/src/mqueuecreatesupp.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'cpukit/posix') 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; -- cgit v1.2.3