diff options
Diffstat (limited to 'cpukit/rtems/src/msg.c')
-rw-r--r-- | cpukit/rtems/src/msg.c | 83 |
1 files changed, 33 insertions, 50 deletions
diff --git a/cpukit/rtems/src/msg.c b/cpukit/rtems/src/msg.c index 8060735beb..1156db4485 100644 --- a/cpukit/rtems/src/msg.c +++ b/cpukit/rtems/src/msg.c @@ -1,64 +1,47 @@ /** - * @file + * @file * - * @brief Message Queue Manager Initialization - * @ingroup ClassicMessageQueue + * @ingroup ClassicMessageQueue + * + * @brief Classic Message Queue Information with Zero Objects */ /* - * COPYRIGHT (c) 1989-2008. - * On-Line Applications Research Corporation (OAR). + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (C) 2018 embedded brains GmbH + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ #if HAVE_CONFIG_H #include "config.h" #endif -#include <rtems/system.h> -#include <rtems/config.h> -#include <rtems/sysinit.h> -#include <rtems/rtems/status.h> -#include <rtems/rtems/attrimpl.h> -#include <rtems/rtems/messageimpl.h> -#include <rtems/rtems/options.h> -#include <rtems/rtems/support.h> - -Objects_Information _Message_queue_Information; - -static void _Message_queue_Manager_initialization(void) -{ - _Objects_Initialize_information( - &_Message_queue_Information, /* object information table */ - OBJECTS_CLASSIC_API, /* object API */ - OBJECTS_RTEMS_MESSAGE_QUEUES, /* object class */ - Configuration_RTEMS_API.maximum_message_queues, - /* maximum objects of this class */ - sizeof( Message_queue_Control ), - /* size of this object's control block */ - OBJECTS_NO_STRING_NAME, /* maximum length of an object name */ - _Message_queue_MP_Send_extract_proxy - /* Proxy extraction support callout */ - ); - - /* - * Register the MP Process Packet routine. - */ - -#if defined(RTEMS_MULTIPROCESSING) - _MPCI_Register_packet_processor( - MP_PACKET_MESSAGE_QUEUE, - _Message_queue_MP_Process_packet - ); -#endif - -} +#include <rtems/rtems/messagedata.h> -RTEMS_SYSINIT_ITEM( - _Message_queue_Manager_initialization, - RTEMS_SYSINIT_CLASSIC_MESSAGE_QUEUE, - RTEMS_SYSINIT_ORDER_MIDDLE +OBJECTS_INFORMATION_DEFINE_ZERO( + _Message_queue, + OBJECTS_CLASSIC_API, + OBJECTS_RTEMS_MESSAGE_QUEUES, + OBJECTS_NO_STRING_NAME ); |