mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-20 11:27:42 +08:00
@@ -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
|
||||
|
||||
@@ -32,16 +32,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
|
||||
@@ -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
|
||||
|
||||
+10
-6
@@ -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
|
||||
);
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <rtems/rtems/barrierimpl.h>
|
||||
#include <rtems/rtems/clock.h>
|
||||
#include <rtems/rtems/dpmemimpl.h>
|
||||
#include <rtems/rtems/messageimpl.h>
|
||||
#include <rtems/rtems/partimpl.h>
|
||||
#include <rtems/rtems/ratemonimpl.h>
|
||||
#include <rtems/rtems/regionimpl.h>
|
||||
@@ -37,7 +36,6 @@
|
||||
|
||||
void _RTEMS_API_Initialize(void)
|
||||
{
|
||||
_Message_queue_Manager_initialization();
|
||||
_Semaphore_Manager_initialization();
|
||||
_Partition_Manager_initialization();
|
||||
_Region_Manager_initialization();
|
||||
|
||||
@@ -35,6 +35,7 @@ extern "C" {
|
||||
#define RTEMS_SYSINIT_CLASSIC_TIMER 000341
|
||||
#define RTEMS_SYSINIT_CLASSIC_SIGNAL 000342
|
||||
#define RTEMS_SYSINIT_CLASSIC_EVENT 000343
|
||||
#define RTEMS_SYSINIT_CLASSIC_MESSAGE_QUEUE 000344
|
||||
#define RTEMS_SYSINIT_IDLE_THREADS 000380
|
||||
#define RTEMS_SYSINIT_BSP_LIBC 000400
|
||||
#define RTEMS_SYSINIT_BEFORE_DRIVERS 000500
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <rtems/test.h>
|
||||
|
||||
#include <rtems/extensionimpl.h>
|
||||
#include <rtems/rtems/messageimpl.h>
|
||||
#include <rtems/rtems/tasksimpl.h>
|
||||
#include <rtems/rtems/timerimpl.h>
|
||||
#include <rtems/score/apimutex.h>
|
||||
@@ -53,6 +54,8 @@ typedef enum {
|
||||
CLASSIC_SIGNAL_POST,
|
||||
CLASSIC_EVENT_PRE,
|
||||
CLASSIC_EVENT_POST,
|
||||
CLASSIC_MESSAGE_QUEUE_PRE,
|
||||
CLASSIC_MESSAGE_QUEUE_POST,
|
||||
IDLE_THREADS_PRE,
|
||||
IDLE_THREADS_POST,
|
||||
BSP_LIBC_PRE,
|
||||
@@ -204,6 +207,18 @@ LAST(RTEMS_SYSINIT_CLASSIC_EVENT)
|
||||
next_step(CLASSIC_EVENT_POST);
|
||||
}
|
||||
|
||||
FIRST(RTEMS_SYSINIT_CLASSIC_MESSAGE_QUEUE)
|
||||
{
|
||||
assert(_Message_queue_Information.maximum == 0);
|
||||
next_step(CLASSIC_MESSAGE_QUEUE_PRE);
|
||||
}
|
||||
|
||||
LAST(RTEMS_SYSINIT_CLASSIC_MESSAGE_QUEUE)
|
||||
{
|
||||
assert(_Message_queue_Information.maximum != 0);
|
||||
next_step(CLASSIC_MESSAGE_QUEUE_POST);
|
||||
}
|
||||
|
||||
FIRST(RTEMS_SYSINIT_IDLE_THREADS)
|
||||
{
|
||||
assert(_System_state_Is_before_initialization(_System_state_Get()));
|
||||
@@ -289,6 +304,8 @@ static void Init(rtems_task_argument arg)
|
||||
|
||||
#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 1
|
||||
|
||||
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TIMERS 1
|
||||
|
||||
Reference in New Issue
Block a user