mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-20 17:51:31 +08:00
@@ -128,7 +128,6 @@ librtems_a_SOURCES += src/ratemonreportstatistics.c
|
||||
librtems_a_SOURCES += src/ratemonident.c
|
||||
librtems_a_SOURCES += src/ratemonperiod.c
|
||||
librtems_a_SOURCES += src/ratemontimeout.c
|
||||
librtems_a_SOURCES += src/ratemondata.c
|
||||
|
||||
## INTR_C_FILES
|
||||
librtems_a_SOURCES += src/intrbody.c
|
||||
|
||||
@@ -34,32 +34,13 @@ 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_RATEMON_EXTERN
|
||||
#define RTEMS_RATEMON_EXTERN extern
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Rate Monotonic Period Class Management Structure
|
||||
*
|
||||
* This instance of Objects_Information is used to manage the
|
||||
* set of rate monotonic period instances.
|
||||
*/
|
||||
RTEMS_RATEMON_EXTERN Objects_Information _Rate_monotonic_Information;
|
||||
|
||||
/**
|
||||
* @brief Rate Monotonic Manager Initialization
|
||||
*
|
||||
* This routine performs the initialization necessary for this manager.
|
||||
*
|
||||
* @note The Rate Monotonic Manager is built on top of the Watchdog Handler
|
||||
*/
|
||||
void _Rate_monotonic_Manager_initialization(void);
|
||||
extern Objects_Information _Rate_monotonic_Information;
|
||||
|
||||
/**
|
||||
* @brief Allocates a period control block from
|
||||
|
||||
@@ -20,13 +20,14 @@
|
||||
|
||||
#include <rtems/system.h>
|
||||
#include <rtems/config.h>
|
||||
#include <rtems/sysinit.h>
|
||||
#include <rtems/rtems/status.h>
|
||||
#include <rtems/rtems/support.h>
|
||||
#include <rtems/score/isr.h>
|
||||
#include <rtems/rtems/ratemonimpl.h>
|
||||
#include <rtems/score/thread.h>
|
||||
|
||||
void _Rate_monotonic_Manager_initialization(void)
|
||||
Objects_Information _Rate_monotonic_Information;
|
||||
|
||||
static void _Rate_monotonic_Manager_initialization(void)
|
||||
{
|
||||
_Objects_Initialize_information(
|
||||
&_Rate_monotonic_Information, /* object information table */
|
||||
@@ -44,3 +45,9 @@ void _Rate_monotonic_Manager_initialization(void)
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
RTEMS_SYSINIT_ITEM(
|
||||
_Rate_monotonic_Manager_initialization,
|
||||
RTEMS_SYSINIT_CLASSIC_RATE_MONOTONIC,
|
||||
RTEMS_SYSINIT_ORDER_MIDDLE
|
||||
);
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @brief Instantiate RTEMS Period Data
|
||||
* @ingroup ClassicRateMon
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
||||
/* instantiate RTEMS period data */
|
||||
#define RTEMS_RATEMON_EXTERN
|
||||
|
||||
#include <rtems/rtems/ratemonimpl.h>
|
||||
@@ -28,10 +28,8 @@
|
||||
#include <rtems/rtems/intr.h>
|
||||
#include <rtems/rtems/barrierimpl.h>
|
||||
#include <rtems/rtems/clock.h>
|
||||
#include <rtems/rtems/ratemonimpl.h>
|
||||
|
||||
void _RTEMS_API_Initialize(void)
|
||||
{
|
||||
_Rate_monotonic_Manager_initialization();
|
||||
_Barrier_Manager_initialization();
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ extern "C" {
|
||||
#define RTEMS_SYSINIT_CLASSIC_PARTITION 000346
|
||||
#define RTEMS_SYSINIT_CLASSIC_REGION 000347
|
||||
#define RTEMS_SYSINIT_CLASSIC_DUAL_PORTED_MEMORY 000348
|
||||
#define RTEMS_SYSINIT_CLASSIC_RATE_MONOTONIC 000349
|
||||
#define RTEMS_SYSINIT_IDLE_THREADS 000380
|
||||
#define RTEMS_SYSINIT_BSP_LIBC 000400
|
||||
#define RTEMS_SYSINIT_BEFORE_DRIVERS 000500
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#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>
|
||||
#include <rtems/rtems/semimpl.h>
|
||||
#include <rtems/rtems/tasksimpl.h>
|
||||
@@ -68,6 +69,8 @@ typedef enum {
|
||||
CLASSIC_REGION_POST,
|
||||
CLASSIC_DUAL_PORTED_MEMORY_PRE,
|
||||
CLASSIC_DUAL_PORTED_MEMORY_POST,
|
||||
CLASSIC_RATE_MONOTONIC_PRE,
|
||||
CLASSIC_RATE_MONOTONIC_POST,
|
||||
IDLE_THREADS_PRE,
|
||||
IDLE_THREADS_POST,
|
||||
BSP_LIBC_PRE,
|
||||
@@ -279,6 +282,18 @@ LAST(RTEMS_SYSINIT_CLASSIC_DUAL_PORTED_MEMORY)
|
||||
next_step(CLASSIC_DUAL_PORTED_MEMORY_POST);
|
||||
}
|
||||
|
||||
FIRST(RTEMS_SYSINIT_CLASSIC_RATE_MONOTONIC)
|
||||
{
|
||||
assert(_Rate_monotonic_Information.maximum == 0);
|
||||
next_step(CLASSIC_RATE_MONOTONIC_PRE);
|
||||
}
|
||||
|
||||
LAST(RTEMS_SYSINIT_CLASSIC_RATE_MONOTONIC)
|
||||
{
|
||||
assert(_Rate_monotonic_Information.maximum != 0);
|
||||
next_step(CLASSIC_RATE_MONOTONIC_POST);
|
||||
}
|
||||
|
||||
FIRST(RTEMS_SYSINIT_IDLE_THREADS)
|
||||
{
|
||||
assert(_System_state_Is_before_initialization(_System_state_Get()));
|
||||
@@ -368,6 +383,8 @@ static void Init(rtems_task_argument arg)
|
||||
|
||||
#define CONFIGURE_MAXIMUM_PARTITIONS 1
|
||||
|
||||
#define CONFIGURE_MAXIMUM_PERIODS 1
|
||||
|
||||
#define CONFIGURE_MAXIMUM_PORTS 1
|
||||
|
||||
#define CONFIGURE_MAXIMUM_REGIONS 1
|
||||
|
||||
Reference in New Issue
Block a user