From 399ba0690cdb0d0647166ab78f3bd4ca84f95352 Mon Sep 17 00:00:00 2001 From: Jennifer Averett Date: Wed, 12 Jan 2000 18:40:18 +0000 Subject: + Removed name validation code (this was already done in nametoid. --- cpukit/posix/src/mqueuecreatesupp.c | 47 +++++-------------------------------- 1 file changed, 6 insertions(+), 41 deletions(-) (limited to 'cpukit/posix/src') diff --git a/cpukit/posix/src/mqueuecreatesupp.c b/cpukit/posix/src/mqueuecreatesupp.c index 009a77900c..ceebb2adc2 100644 --- a/cpukit/posix/src/mqueuecreatesupp.c +++ b/cpukit/posix/src/mqueuecreatesupp.c @@ -81,20 +81,6 @@ int _POSIX_Message_queue_Create_support( } #endif - if ( name ) { - - if( strlen(name) > PATH_MAX ) { /* XXX - on non-null terminated name? */ - _Thread_Enable_dispatch(); - set_errno_and_return_minus_one( ENAMETOOLONG ); - } - - /* - * XXX Greater than NAME_MAX while POSIX_NO_TRUNC in effect. - * XXX Error description in POSIX book different for mq_open and mq_unlink - * Why??? - */ - } - the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); @@ -103,40 +89,19 @@ int _POSIX_Message_queue_Create_support( the_mq->process_shared = pshared; the_mq->oflag = oflag; - - if ( name ) { - the_mq->named = TRUE; - the_mq->open_count = 1; - the_mq->linked = TRUE; - } - else { - the_mq->named = FALSE; + the_mq->named = TRUE; + the_mq->open_count = 1; + the_mq->linked = TRUE; - } - - if ( oflag & O_NONBLOCK ) - the_mq->blocking = FALSE; - else - the_mq->blocking = TRUE; /* XXX * - * Note that this should be based on the current scheduling policy. + * Note that thread blocking discipline should be based on the + * current scheduling policy. */ - /* XXX - * - * Message and waiting disciplines are not distinguished. - */ -/* - the_mq_attr->message_discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; - the_mq_attr->waiting_discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; - */ - - - the_mq->Message_queue.Attributes.discipline = - CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; the_mq_attr = &the_mq->Message_queue.Attributes; + the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( &the_mq->Message_queue, -- cgit v1.2.3