summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-12-14 15:02:45 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-02-03 10:00:52 +0100
commited8b00e667fe179730beb8947b5afb6bcc234d7a (patch)
treee1c29a868de23a2112792f6687b2bd5d19d66037 /cpukit/rtems
parentOptional Classic Event initialization (diff)
downloadrtems-ed8b00e667fe179730beb8947b5afb6bcc234d7a.tar.bz2
Optional Classic Message Queue initialization
Update #2408.
Diffstat (limited to 'cpukit/rtems')
-rw-r--r--cpukit/rtems/Makefile.am1
-rw-r--r--cpukit/rtems/include/rtems/rtems/messageimpl.h19
-rw-r--r--cpukit/rtems/src/msg.c16
-rw-r--r--cpukit/rtems/src/msgdata.c25
4 files changed, 11 insertions, 50 deletions
diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am
index 6c87b94a75..2fd8ecb1a2 100644
--- a/cpukit/rtems/Makefile.am
+++ b/cpukit/rtems/Makefile.am
@@ -184,7 +184,6 @@ librtems_a_SOURCES += src/msgqreceive.c
librtems_a_SOURCES += src/msgqsend.c
librtems_a_SOURCES += src/msgqtranslatereturncode.c
librtems_a_SOURCES += src/msgqurgent.c
-librtems_a_SOURCES += src/msgdata.c
## SEMAPHORE_C_FILES
librtems_a_SOURCES += src/sem.c
diff --git a/cpukit/rtems/include/rtems/rtems/messageimpl.h b/cpukit/rtems/include/rtems/rtems/messageimpl.h
index 2399d65f29..3c904f0f8c 100644
--- a/cpukit/rtems/include/rtems/rtems/messageimpl.h
+++ b/cpukit/rtems/include/rtems/rtems/messageimpl.h
@@ -33,16 +33,6 @@ extern "C" {
*/
/**
- * This constant is defined to extern most of the time when using
- * this header file. However by defining it to nothing, the data
- * declared in this header file can be instantiated. This is done
- * in a single per manager file.
- */
-#ifndef RTEMS_MESSAGE_EXTERN
-#define RTEMS_MESSAGE_EXTERN extern
-#endif
-
-/**
* The following enumerated type details the modes in which a message
* may be submitted to a message queue. The message may be posted
* in a send or urgent fashion.
@@ -64,14 +54,7 @@ typedef enum {
* The following defines the information control block used to
* manage this class of objects.
*/
-RTEMS_MESSAGE_EXTERN Objects_Information _Message_queue_Information;
-
-/**
- * @brief Message Queue Manager Initialization
- *
- * This routine performs the initialization necessary for this manager.
- */
-void _Message_queue_Manager_initialization(void);
+extern Objects_Information _Message_queue_Information;
/**
* @brief Message_queue_Submit
diff --git a/cpukit/rtems/src/msg.c b/cpukit/rtems/src/msg.c
index 8dd046da1b..acb6c37601 100644
--- a/cpukit/rtems/src/msg.c
+++ b/cpukit/rtems/src/msg.c
@@ -20,18 +20,16 @@
#include <rtems/system.h>
#include <rtems/config.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coremsgimpl.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/wkspace.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>
-void _Message_queue_Manager_initialization(void)
+Objects_Information _Message_queue_Information;
+
+static void _Message_queue_Manager_initialization(void)
{
_Objects_Initialize_information(
&_Message_queue_Information, /* object information table */
@@ -63,3 +61,9 @@ void _Message_queue_Manager_initialization(void)
#endif
}
+
+RTEMS_SYSINIT_ITEM(
+ _Message_queue_Manager_initialization,
+ RTEMS_SYSINIT_CLASSIC_MESSAGE_QUEUE,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
diff --git a/cpukit/rtems/src/msgdata.c b/cpukit/rtems/src/msgdata.c
deleted file mode 100644
index 448f2466b4..0000000000
--- a/cpukit/rtems/src/msgdata.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * @file
- *
- * @brief Instantiate the Message Queue Data
- * @ingroup ClassicMessageQueue
- */
-
-/*
- * COPYRIGHT (c) 1989-2007.
- * On-Line Applications Research Corporation (OAR).
- *
- * 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.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#define RTEMS_MESSAGE_EXTERN
-
-#include <rtems/system.h>
-#include <rtems/rtems/messageimpl.h>
-