forked from Imagelibrary/rtems
added initial posix configuration support
This commit is contained in:
@@ -90,8 +90,9 @@ rtems_libio_config(
|
||||
* tweak config to reflect # of semaphores we will need
|
||||
*/
|
||||
|
||||
config->maximum_semaphores += 1; /* one for iop table */
|
||||
config->maximum_semaphores += max_fds;
|
||||
/* one for iop table */
|
||||
config->RTEMS_api_configuration->maximum_semaphores += 1;
|
||||
config->RTEMS_api_configuration->maximum_semaphores += max_fds;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
51
c/src/exec/posix/headers/config.h
Normal file
51
c/src/exec/posix/headers/config.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/* config.h
|
||||
*
|
||||
* This include file contains the table of user defined configuration
|
||||
* parameters specific for the POSIX API.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __RTEMS_POSIX_CONFIGURATION_h
|
||||
#define __RTEMS_POSIX_CONFIGURATION_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XXX
|
||||
*
|
||||
* The following records define the Configuration Table. The
|
||||
* information contained in this table is required in all
|
||||
* RTEMS systems, whether single or multiprocessor. This
|
||||
* table primarily defines the following:
|
||||
*
|
||||
* + required number of each object type
|
||||
*/
|
||||
|
||||
/* XXX fix me */
|
||||
typedef int posix_initialization_tasks_table;
|
||||
|
||||
typedef struct {
|
||||
int maximum_threads;
|
||||
int maximum_mutexes;
|
||||
int maximum_condition_variables;
|
||||
int number_of_initialization_tasks;
|
||||
posix_initialization_tasks_table *User_initialization_tasks_table;
|
||||
} posix_api_configuration_table;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
51
c/src/exec/posix/include/rtems/posix/config.h
Normal file
51
c/src/exec/posix/include/rtems/posix/config.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/* config.h
|
||||
*
|
||||
* This include file contains the table of user defined configuration
|
||||
* parameters specific for the POSIX API.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __RTEMS_POSIX_CONFIGURATION_h
|
||||
#define __RTEMS_POSIX_CONFIGURATION_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XXX
|
||||
*
|
||||
* The following records define the Configuration Table. The
|
||||
* information contained in this table is required in all
|
||||
* RTEMS systems, whether single or multiprocessor. This
|
||||
* table primarily defines the following:
|
||||
*
|
||||
* + required number of each object type
|
||||
*/
|
||||
|
||||
/* XXX fix me */
|
||||
typedef int posix_initialization_tasks_table;
|
||||
|
||||
typedef struct {
|
||||
int maximum_threads;
|
||||
int maximum_mutexes;
|
||||
int maximum_condition_variables;
|
||||
int number_of_initialization_tasks;
|
||||
posix_initialization_tasks_table *User_initialization_tasks_table;
|
||||
} posix_api_configuration_table;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
54
c/src/exec/rtems/headers/config.h
Normal file
54
c/src/exec/rtems/headers/config.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/* config.h
|
||||
*
|
||||
* This include file contains the table of user defined configuration
|
||||
* parameters specific for the RTEMS API.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __RTEMS_RTEMS_CONFIGURATION_h
|
||||
#define __RTEMS_RTEMS_CONFIGURATION_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <rtems/rtems/types.h>
|
||||
#include <rtems/rtems/tasks.h>
|
||||
|
||||
/*
|
||||
* The following records define the Configuration Table. The
|
||||
* information contained in this table is required in all
|
||||
* RTEMS systems, whether single or multiprocessor. This
|
||||
* table primarily defines the following:
|
||||
*
|
||||
* + required number of each object type
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
unsigned32 maximum_tasks;
|
||||
unsigned32 maximum_timers;
|
||||
unsigned32 maximum_semaphores;
|
||||
unsigned32 maximum_message_queues;
|
||||
unsigned32 maximum_partitions;
|
||||
unsigned32 maximum_regions;
|
||||
unsigned32 maximum_ports;
|
||||
unsigned32 maximum_periods;
|
||||
unsigned32 number_of_initialization_tasks;
|
||||
rtems_initialization_tasks_table *User_initialization_tasks_table;
|
||||
} rtems_api_configuration_table;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
@@ -45,6 +45,7 @@ extern "C" {
|
||||
#include <rtems/rtems/eventset.h>
|
||||
#include <rtems/rtems/asr.h>
|
||||
#include <rtems/rtems/attr.h>
|
||||
#include <rtems/rtems/status.h>
|
||||
|
||||
/*
|
||||
* Constant to be used as the ID of current task
|
||||
|
||||
54
c/src/exec/rtems/include/rtems/rtems/config.h
Normal file
54
c/src/exec/rtems/include/rtems/rtems/config.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/* config.h
|
||||
*
|
||||
* This include file contains the table of user defined configuration
|
||||
* parameters specific for the RTEMS API.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __RTEMS_RTEMS_CONFIGURATION_h
|
||||
#define __RTEMS_RTEMS_CONFIGURATION_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <rtems/rtems/types.h>
|
||||
#include <rtems/rtems/tasks.h>
|
||||
|
||||
/*
|
||||
* The following records define the Configuration Table. The
|
||||
* information contained in this table is required in all
|
||||
* RTEMS systems, whether single or multiprocessor. This
|
||||
* table primarily defines the following:
|
||||
*
|
||||
* + required number of each object type
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
unsigned32 maximum_tasks;
|
||||
unsigned32 maximum_timers;
|
||||
unsigned32 maximum_semaphores;
|
||||
unsigned32 maximum_message_queues;
|
||||
unsigned32 maximum_partitions;
|
||||
unsigned32 maximum_regions;
|
||||
unsigned32 maximum_ports;
|
||||
unsigned32 maximum_periods;
|
||||
unsigned32 number_of_initialization_tasks;
|
||||
rtems_initialization_tasks_table *User_initialization_tasks_table;
|
||||
} rtems_api_configuration_table;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
@@ -45,6 +45,7 @@ extern "C" {
|
||||
#include <rtems/rtems/eventset.h>
|
||||
#include <rtems/rtems/asr.h>
|
||||
#include <rtems/rtems/attr.h>
|
||||
#include <rtems/rtems/status.h>
|
||||
|
||||
/*
|
||||
* Constant to be used as the ID of current task
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
extern rtems_initialization_tasks_table Initialization_tasks[];
|
||||
extern rtems_driver_address_table Device_drivers[];
|
||||
extern rtems_configuration_table Configuration;
|
||||
@@ -341,9 +340,8 @@ rtems_multiprocessing_table Multiprocessing_configuration = {
|
||||
#endif
|
||||
|
||||
#ifdef CONFIGURE_INIT
|
||||
rtems_configuration_table Configuration = {
|
||||
CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
|
||||
CONFIGURE_EXECUTIVE_RAM_SIZE,
|
||||
|
||||
rtems_api_configuration_table Configuration_RTEMS_API = {
|
||||
CONFIGURE_MAXIMUM_TASKS,
|
||||
CONFIGURE_MAXIMUM_TIMERS,
|
||||
CONFIGURE_MAXIMUM_SEMAPHORES,
|
||||
@@ -352,18 +350,25 @@ rtems_configuration_table Configuration = {
|
||||
CONFIGURE_MAXIMUM_REGIONS,
|
||||
CONFIGURE_MAXIMUM_PORTS,
|
||||
CONFIGURE_MAXIMUM_PERIODS,
|
||||
sizeof (Initialization_tasks)/
|
||||
sizeof(rtems_initialization_tasks_table), /* number of init tasks */
|
||||
Initialization_tasks /* init task(s) table */
|
||||
};
|
||||
|
||||
rtems_configuration_table Configuration = {
|
||||
CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
|
||||
CONFIGURE_EXECUTIVE_RAM_SIZE,
|
||||
CONFIGURE_MAXIMUM_USER_EXTENSIONS,
|
||||
CONFIGURE_MICROSECONDS_PER_TICK,
|
||||
CONFIGURE_TICKS_PER_TIMESLICE,
|
||||
sizeof (Initialization_tasks)/
|
||||
sizeof(rtems_initialization_tasks_table), /* number of init tasks */
|
||||
Initialization_tasks, /* init task(s) table */
|
||||
CONFIGURE_MAXIMUM_DEVICES,
|
||||
sizeof (Device_drivers)/
|
||||
sizeof(rtems_driver_address_table), /* number of device drivers */
|
||||
CONFIGURE_MAXIMUM_DEVICES,
|
||||
Device_drivers, /* pointer to driver table */
|
||||
CONFIGURE_INITIAL_EXTENSIONS, /* pointer to initial extensions */
|
||||
CONFIGURE_MULTIPROCESSING_TABLE /* ptr to MP config table */
|
||||
CONFIGURE_MULTIPROCESSING_TABLE, /* pointer to MP config table */
|
||||
&Configuration_RTEMS_API, /* pointer to RTEMS API config */
|
||||
NULL /* pointer to RTEMS API config */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -21,12 +21,18 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <rtems/posix/config.h>
|
||||
#include <rtems/rtems/config.h>
|
||||
|
||||
/* XXX <rtems/rtems/config.h> should cover these
|
||||
#include <rtems/rtems/status.h>
|
||||
#include <rtems/rtems/types.h>
|
||||
#include <rtems/rtems/tasks.h>
|
||||
*/
|
||||
|
||||
#include <rtems/extension.h>
|
||||
#include <rtems/io.h>
|
||||
#include <rtems/score/mpci.h>
|
||||
#include <rtems/rtems/types.h>
|
||||
#include <rtems/rtems/tasks.h>
|
||||
|
||||
/*
|
||||
* The following records define the Multiprocessor Configuration
|
||||
@@ -50,32 +56,24 @@ typedef struct {
|
||||
* table primarily defines the following:
|
||||
*
|
||||
* + location and size of the RTEMS Workspace
|
||||
* + required number of each object type
|
||||
* + microseconds per clock tick
|
||||
* + clock ticks per task timeslice
|
||||
* + required number of each object type for each API configured
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
void *work_space_start;
|
||||
unsigned32 work_space_size;
|
||||
unsigned32 maximum_tasks;
|
||||
unsigned32 maximum_timers;
|
||||
unsigned32 maximum_semaphores;
|
||||
unsigned32 maximum_message_queues;
|
||||
unsigned32 maximum_partitions;
|
||||
unsigned32 maximum_regions;
|
||||
unsigned32 maximum_ports;
|
||||
unsigned32 maximum_periods;
|
||||
unsigned32 maximum_extensions;
|
||||
unsigned32 microseconds_per_tick;
|
||||
unsigned32 ticks_per_timeslice;
|
||||
unsigned32 number_of_initialization_tasks;
|
||||
rtems_initialization_tasks_table *User_initialization_tasks_table;
|
||||
unsigned32 number_of_device_drivers;
|
||||
unsigned32 maximum_devices;
|
||||
unsigned32 number_of_device_drivers;
|
||||
rtems_driver_address_table *Device_driver_table;
|
||||
rtems_extensions_table *User_extension_table;
|
||||
rtems_multiprocessing_table *User_multiprocessing_table;
|
||||
rtems_api_configuration_table *RTEMS_api_configuration;
|
||||
posix_api_configuration_table *Posix_api_configuration;
|
||||
} rtems_configuration_table;
|
||||
|
||||
/*
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
extern rtems_initialization_tasks_table Initialization_tasks[];
|
||||
extern rtems_driver_address_table Device_drivers[];
|
||||
extern rtems_configuration_table Configuration;
|
||||
@@ -341,9 +340,8 @@ rtems_multiprocessing_table Multiprocessing_configuration = {
|
||||
#endif
|
||||
|
||||
#ifdef CONFIGURE_INIT
|
||||
rtems_configuration_table Configuration = {
|
||||
CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
|
||||
CONFIGURE_EXECUTIVE_RAM_SIZE,
|
||||
|
||||
rtems_api_configuration_table Configuration_RTEMS_API = {
|
||||
CONFIGURE_MAXIMUM_TASKS,
|
||||
CONFIGURE_MAXIMUM_TIMERS,
|
||||
CONFIGURE_MAXIMUM_SEMAPHORES,
|
||||
@@ -352,18 +350,25 @@ rtems_configuration_table Configuration = {
|
||||
CONFIGURE_MAXIMUM_REGIONS,
|
||||
CONFIGURE_MAXIMUM_PORTS,
|
||||
CONFIGURE_MAXIMUM_PERIODS,
|
||||
sizeof (Initialization_tasks)/
|
||||
sizeof(rtems_initialization_tasks_table), /* number of init tasks */
|
||||
Initialization_tasks /* init task(s) table */
|
||||
};
|
||||
|
||||
rtems_configuration_table Configuration = {
|
||||
CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
|
||||
CONFIGURE_EXECUTIVE_RAM_SIZE,
|
||||
CONFIGURE_MAXIMUM_USER_EXTENSIONS,
|
||||
CONFIGURE_MICROSECONDS_PER_TICK,
|
||||
CONFIGURE_TICKS_PER_TIMESLICE,
|
||||
sizeof (Initialization_tasks)/
|
||||
sizeof(rtems_initialization_tasks_table), /* number of init tasks */
|
||||
Initialization_tasks, /* init task(s) table */
|
||||
CONFIGURE_MAXIMUM_DEVICES,
|
||||
sizeof (Device_drivers)/
|
||||
sizeof(rtems_driver_address_table), /* number of device drivers */
|
||||
CONFIGURE_MAXIMUM_DEVICES,
|
||||
Device_drivers, /* pointer to driver table */
|
||||
CONFIGURE_INITIAL_EXTENSIONS, /* pointer to initial extensions */
|
||||
CONFIGURE_MULTIPROCESSING_TABLE /* ptr to MP config table */
|
||||
CONFIGURE_MULTIPROCESSING_TABLE, /* pointer to MP config table */
|
||||
&Configuration_RTEMS_API, /* pointer to RTEMS API config */
|
||||
NULL /* pointer to RTEMS API config */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -21,12 +21,18 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <rtems/posix/config.h>
|
||||
#include <rtems/rtems/config.h>
|
||||
|
||||
/* XXX <rtems/rtems/config.h> should cover these
|
||||
#include <rtems/rtems/status.h>
|
||||
#include <rtems/rtems/types.h>
|
||||
#include <rtems/rtems/tasks.h>
|
||||
*/
|
||||
|
||||
#include <rtems/extension.h>
|
||||
#include <rtems/io.h>
|
||||
#include <rtems/score/mpci.h>
|
||||
#include <rtems/rtems/types.h>
|
||||
#include <rtems/rtems/tasks.h>
|
||||
|
||||
/*
|
||||
* The following records define the Multiprocessor Configuration
|
||||
@@ -50,32 +56,24 @@ typedef struct {
|
||||
* table primarily defines the following:
|
||||
*
|
||||
* + location and size of the RTEMS Workspace
|
||||
* + required number of each object type
|
||||
* + microseconds per clock tick
|
||||
* + clock ticks per task timeslice
|
||||
* + required number of each object type for each API configured
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
void *work_space_start;
|
||||
unsigned32 work_space_size;
|
||||
unsigned32 maximum_tasks;
|
||||
unsigned32 maximum_timers;
|
||||
unsigned32 maximum_semaphores;
|
||||
unsigned32 maximum_message_queues;
|
||||
unsigned32 maximum_partitions;
|
||||
unsigned32 maximum_regions;
|
||||
unsigned32 maximum_ports;
|
||||
unsigned32 maximum_periods;
|
||||
unsigned32 maximum_extensions;
|
||||
unsigned32 microseconds_per_tick;
|
||||
unsigned32 ticks_per_timeslice;
|
||||
unsigned32 number_of_initialization_tasks;
|
||||
rtems_initialization_tasks_table *User_initialization_tasks_table;
|
||||
unsigned32 number_of_device_drivers;
|
||||
unsigned32 maximum_devices;
|
||||
unsigned32 number_of_device_drivers;
|
||||
rtems_driver_address_table *Device_driver_table;
|
||||
rtems_extensions_table *User_extension_table;
|
||||
rtems_multiprocessing_table *User_multiprocessing_table;
|
||||
rtems_api_configuration_table *RTEMS_api_configuration;
|
||||
posix_api_configuration_table *Posix_api_configuration;
|
||||
} rtems_configuration_table;
|
||||
|
||||
/*
|
||||
|
||||
@@ -45,6 +45,10 @@ void _RTEMS_API_Initialize(
|
||||
rtems_configuration_table *configuration_table
|
||||
)
|
||||
{
|
||||
rtems_api_configuration_table *api_configuration;
|
||||
|
||||
api_configuration = configuration_table->RTEMS_api_configuration;
|
||||
|
||||
_Attributes_Handler_initialization();
|
||||
|
||||
_Interrupt_Manager_initialization();
|
||||
@@ -52,38 +56,30 @@ void _RTEMS_API_Initialize(
|
||||
_Multiprocessing_Manager_initialization();
|
||||
|
||||
_RTEMS_tasks_Manager_initialization(
|
||||
configuration_table->maximum_tasks,
|
||||
configuration_table->number_of_initialization_tasks,
|
||||
configuration_table->User_initialization_tasks_table
|
||||
api_configuration->maximum_tasks,
|
||||
api_configuration->number_of_initialization_tasks,
|
||||
api_configuration->User_initialization_tasks_table
|
||||
);
|
||||
|
||||
_Timer_Manager_initialization( configuration_table->maximum_timers );
|
||||
_Timer_Manager_initialization( api_configuration->maximum_timers );
|
||||
|
||||
_Signal_Manager_initialization();
|
||||
|
||||
_Event_Manager_initialization();
|
||||
|
||||
_Message_queue_Manager_initialization(
|
||||
configuration_table->maximum_message_queues
|
||||
api_configuration->maximum_message_queues
|
||||
);
|
||||
|
||||
_Semaphore_Manager_initialization(
|
||||
configuration_table->maximum_semaphores
|
||||
);
|
||||
_Semaphore_Manager_initialization( api_configuration->maximum_semaphores );
|
||||
|
||||
_Partition_Manager_initialization(
|
||||
configuration_table->maximum_partitions
|
||||
);
|
||||
_Partition_Manager_initialization( api_configuration->maximum_partitions );
|
||||
|
||||
_Region_Manager_initialization( configuration_table->maximum_regions );
|
||||
_Region_Manager_initialization( api_configuration->maximum_regions );
|
||||
|
||||
_Dual_ported_memory_Manager_initialization(
|
||||
configuration_table->maximum_ports
|
||||
);
|
||||
_Dual_ported_memory_Manager_initialization( api_configuration->maximum_ports);
|
||||
|
||||
_Rate_monotonic_Manager_initialization(
|
||||
configuration_table->maximum_periods
|
||||
);
|
||||
_Rate_monotonic_Manager_initialization( api_configuration->maximum_periods );
|
||||
}
|
||||
|
||||
/* end of file */
|
||||
|
||||
@@ -377,7 +377,7 @@ bsp_start(void)
|
||||
* Add 1 region for RTEMS Malloc
|
||||
*/
|
||||
|
||||
BSP_Configuration.maximum_regions++;
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
|
||||
#ifdef RTEMS_NEWLIB
|
||||
/*
|
||||
|
||||
@@ -194,7 +194,7 @@ int main(
|
||||
* Add 1 region for Malloc in libc_low
|
||||
*/
|
||||
|
||||
BSP_Configuration.maximum_regions++;
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -194,7 +194,7 @@ int main(
|
||||
* Add 1 region for Malloc in libc_low
|
||||
*/
|
||||
|
||||
BSP_Configuration.maximum_regions++;
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -208,7 +208,7 @@ int main(
|
||||
* Add 1 region for the RTEMS Malloc
|
||||
*/
|
||||
|
||||
BSP_Configuration.maximum_regions++;
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -216,7 +216,7 @@ int main(
|
||||
* Add 1 region for Malloc in libc_low
|
||||
*/
|
||||
|
||||
BSP_Configuration.maximum_regions++;
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -189,7 +189,7 @@ int main(
|
||||
* Add 1 region for Malloc in libc_low
|
||||
*/
|
||||
|
||||
BSP_Configuration.maximum_regions++;
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -199,7 +199,7 @@ int main(
|
||||
* Add 1 region for Malloc in libc_low
|
||||
*/
|
||||
|
||||
BSP_Configuration.maximum_regions++;
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -180,7 +180,7 @@ int main(
|
||||
* Add 1 region for the RTEMS Malloc
|
||||
*/
|
||||
|
||||
BSP_Configuration.maximum_regions++;
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -177,7 +177,7 @@ int main(
|
||||
* Add 1 region for the RTEMS Malloc
|
||||
*/
|
||||
|
||||
BSP_Configuration.maximum_regions++;
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -223,7 +223,7 @@ int main(
|
||||
* Add 1 region for the RTEMS Malloc
|
||||
*/
|
||||
|
||||
BSP_Configuration.maximum_regions++;
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -206,7 +206,7 @@ int main(
|
||||
* Add 1 region for the RTEMS Malloc
|
||||
*/
|
||||
|
||||
BSP_Configuration.maximum_regions++;
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -212,7 +212,7 @@ int main(
|
||||
* Add 1 region for the RTEMS Malloc
|
||||
*/
|
||||
|
||||
BSP_Configuration.maximum_regions++;
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -220,7 +220,7 @@ int main(
|
||||
* Add 1 region for the RTEMS Malloc
|
||||
*/
|
||||
|
||||
BSP_Configuration.maximum_regions++;
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -177,7 +177,7 @@ int bsp_start(
|
||||
* Add 1 region for the RTEMS Malloc
|
||||
*/
|
||||
|
||||
BSP_Configuration.maximum_regions++;
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -195,7 +195,7 @@ int bsp_start(
|
||||
* Add 1 region for the RTEMS Malloc
|
||||
*/
|
||||
|
||||
BSP_Configuration.maximum_regions++;
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -323,7 +323,7 @@ bsp_start(void)
|
||||
* Add 1 region for RTEMS Malloc
|
||||
*/
|
||||
|
||||
BSP_Configuration.maximum_regions++;
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
|
||||
#ifdef RTEMS_NEWLIB
|
||||
/*
|
||||
|
||||
@@ -90,8 +90,9 @@ rtems_libio_config(
|
||||
* tweak config to reflect # of semaphores we will need
|
||||
*/
|
||||
|
||||
config->maximum_semaphores += 1; /* one for iop table */
|
||||
config->maximum_semaphores += max_fds;
|
||||
/* one for iop table */
|
||||
config->RTEMS_api_configuration->maximum_semaphores += 1;
|
||||
config->RTEMS_api_configuration->maximum_semaphores += max_fds;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -29,21 +29,22 @@ rtems_monitor_config_canonical(
|
||||
)
|
||||
{
|
||||
rtems_configuration_table *c = (rtems_configuration_table *) config_void;
|
||||
rtems_api_configuration_table *r = c->RTEMS_api_configuration;
|
||||
|
||||
canonical_config->work_space_start = c->work_space_start;
|
||||
canonical_config->work_space_size = c->work_space_size;
|
||||
canonical_config->maximum_tasks = c->maximum_tasks;
|
||||
canonical_config->maximum_timers = c->maximum_timers;
|
||||
canonical_config->maximum_semaphores = c->maximum_semaphores;
|
||||
canonical_config->maximum_message_queues = c->maximum_message_queues;
|
||||
canonical_config->maximum_partitions = c->maximum_partitions;
|
||||
canonical_config->maximum_regions = c->maximum_regions;
|
||||
canonical_config->maximum_ports = c->maximum_ports;
|
||||
canonical_config->maximum_periods = c->maximum_periods;
|
||||
canonical_config->maximum_tasks = r->maximum_tasks;
|
||||
canonical_config->maximum_timers = r->maximum_timers;
|
||||
canonical_config->maximum_semaphores = r->maximum_semaphores;
|
||||
canonical_config->maximum_message_queues = r->maximum_message_queues;
|
||||
canonical_config->maximum_partitions = r->maximum_partitions;
|
||||
canonical_config->maximum_regions = r->maximum_regions;
|
||||
canonical_config->maximum_ports = r->maximum_ports;
|
||||
canonical_config->maximum_periods = r->maximum_periods;
|
||||
canonical_config->maximum_extensions = c->maximum_extensions;
|
||||
canonical_config->microseconds_per_tick = c->microseconds_per_tick;
|
||||
canonical_config->ticks_per_timeslice = c->ticks_per_timeslice;
|
||||
canonical_config->number_of_initialization_tasks = c->number_of_initialization_tasks;
|
||||
canonical_config->number_of_initialization_tasks = r->number_of_initialization_tasks;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -42,12 +42,12 @@ rtems_monitor_init_task_next(
|
||||
rtems_initialization_tasks_table *itask;
|
||||
int n = rtems_get_index(*next_id);
|
||||
|
||||
if (n >= c->number_of_initialization_tasks)
|
||||
if (n >= c->RTEMS_api_configuration->number_of_initialization_tasks)
|
||||
goto failed;
|
||||
|
||||
_Thread_Disable_dispatch();
|
||||
|
||||
itask = c->User_initialization_tasks_table + n;
|
||||
itask = c->RTEMS_api_configuration->User_initialization_tasks_table + n;
|
||||
|
||||
/*
|
||||
* dummy up a fake id and name for this item
|
||||
|
||||
@@ -29,21 +29,22 @@ rtems_monitor_config_canonical(
|
||||
)
|
||||
{
|
||||
rtems_configuration_table *c = (rtems_configuration_table *) config_void;
|
||||
rtems_api_configuration_table *r = c->RTEMS_api_configuration;
|
||||
|
||||
canonical_config->work_space_start = c->work_space_start;
|
||||
canonical_config->work_space_size = c->work_space_size;
|
||||
canonical_config->maximum_tasks = c->maximum_tasks;
|
||||
canonical_config->maximum_timers = c->maximum_timers;
|
||||
canonical_config->maximum_semaphores = c->maximum_semaphores;
|
||||
canonical_config->maximum_message_queues = c->maximum_message_queues;
|
||||
canonical_config->maximum_partitions = c->maximum_partitions;
|
||||
canonical_config->maximum_regions = c->maximum_regions;
|
||||
canonical_config->maximum_ports = c->maximum_ports;
|
||||
canonical_config->maximum_periods = c->maximum_periods;
|
||||
canonical_config->maximum_tasks = r->maximum_tasks;
|
||||
canonical_config->maximum_timers = r->maximum_timers;
|
||||
canonical_config->maximum_semaphores = r->maximum_semaphores;
|
||||
canonical_config->maximum_message_queues = r->maximum_message_queues;
|
||||
canonical_config->maximum_partitions = r->maximum_partitions;
|
||||
canonical_config->maximum_regions = r->maximum_regions;
|
||||
canonical_config->maximum_ports = r->maximum_ports;
|
||||
canonical_config->maximum_periods = r->maximum_periods;
|
||||
canonical_config->maximum_extensions = c->maximum_extensions;
|
||||
canonical_config->microseconds_per_tick = c->microseconds_per_tick;
|
||||
canonical_config->ticks_per_timeslice = c->ticks_per_timeslice;
|
||||
canonical_config->number_of_initialization_tasks = c->number_of_initialization_tasks;
|
||||
canonical_config->number_of_initialization_tasks = r->number_of_initialization_tasks;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -42,12 +42,12 @@ rtems_monitor_init_task_next(
|
||||
rtems_initialization_tasks_table *itask;
|
||||
int n = rtems_get_index(*next_id);
|
||||
|
||||
if (n >= c->number_of_initialization_tasks)
|
||||
if (n >= c->RTEMS_api_configuration->number_of_initialization_tasks)
|
||||
goto failed;
|
||||
|
||||
_Thread_Disable_dispatch();
|
||||
|
||||
itask = c->User_initialization_tasks_table + n;
|
||||
itask = c->RTEMS_api_configuration->User_initialization_tasks_table + n;
|
||||
|
||||
/*
|
||||
* dummy up a fake id and name for this item
|
||||
|
||||
@@ -109,7 +109,8 @@ extern "C" {
|
||||
(TB)->ticks = TK; }
|
||||
|
||||
#define task_number( tid ) \
|
||||
( rtems_get_index( tid ) - BSP_Configuration.number_of_initialization_tasks )
|
||||
( rtems_get_index( tid ) - \
|
||||
BSP_Configuration.RTEMS_api_configuration->number_of_initialization_tasks )
|
||||
|
||||
static inline rtems_unsigned32 get_ticks_per_second( void )
|
||||
{
|
||||
|
||||
@@ -90,8 +90,9 @@ rtems_libio_config(
|
||||
* tweak config to reflect # of semaphores we will need
|
||||
*/
|
||||
|
||||
config->maximum_semaphores += 1; /* one for iop table */
|
||||
config->maximum_semaphores += max_fds;
|
||||
/* one for iop table */
|
||||
config->RTEMS_api_configuration->maximum_semaphores += 1;
|
||||
config->RTEMS_api_configuration->maximum_semaphores += max_fds;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -29,21 +29,22 @@ rtems_monitor_config_canonical(
|
||||
)
|
||||
{
|
||||
rtems_configuration_table *c = (rtems_configuration_table *) config_void;
|
||||
rtems_api_configuration_table *r = c->RTEMS_api_configuration;
|
||||
|
||||
canonical_config->work_space_start = c->work_space_start;
|
||||
canonical_config->work_space_size = c->work_space_size;
|
||||
canonical_config->maximum_tasks = c->maximum_tasks;
|
||||
canonical_config->maximum_timers = c->maximum_timers;
|
||||
canonical_config->maximum_semaphores = c->maximum_semaphores;
|
||||
canonical_config->maximum_message_queues = c->maximum_message_queues;
|
||||
canonical_config->maximum_partitions = c->maximum_partitions;
|
||||
canonical_config->maximum_regions = c->maximum_regions;
|
||||
canonical_config->maximum_ports = c->maximum_ports;
|
||||
canonical_config->maximum_periods = c->maximum_periods;
|
||||
canonical_config->maximum_tasks = r->maximum_tasks;
|
||||
canonical_config->maximum_timers = r->maximum_timers;
|
||||
canonical_config->maximum_semaphores = r->maximum_semaphores;
|
||||
canonical_config->maximum_message_queues = r->maximum_message_queues;
|
||||
canonical_config->maximum_partitions = r->maximum_partitions;
|
||||
canonical_config->maximum_regions = r->maximum_regions;
|
||||
canonical_config->maximum_ports = r->maximum_ports;
|
||||
canonical_config->maximum_periods = r->maximum_periods;
|
||||
canonical_config->maximum_extensions = c->maximum_extensions;
|
||||
canonical_config->microseconds_per_tick = c->microseconds_per_tick;
|
||||
canonical_config->ticks_per_timeslice = c->ticks_per_timeslice;
|
||||
canonical_config->number_of_initialization_tasks = c->number_of_initialization_tasks;
|
||||
canonical_config->number_of_initialization_tasks = r->number_of_initialization_tasks;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -42,12 +42,12 @@ rtems_monitor_init_task_next(
|
||||
rtems_initialization_tasks_table *itask;
|
||||
int n = rtems_get_index(*next_id);
|
||||
|
||||
if (n >= c->number_of_initialization_tasks)
|
||||
if (n >= c->RTEMS_api_configuration->number_of_initialization_tasks)
|
||||
goto failed;
|
||||
|
||||
_Thread_Disable_dispatch();
|
||||
|
||||
itask = c->User_initialization_tasks_table + n;
|
||||
itask = c->RTEMS_api_configuration->User_initialization_tasks_table + n;
|
||||
|
||||
/*
|
||||
* dummy up a fake id and name for this item
|
||||
|
||||
51
cpukit/posix/include/rtems/posix/config.h
Normal file
51
cpukit/posix/include/rtems/posix/config.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/* config.h
|
||||
*
|
||||
* This include file contains the table of user defined configuration
|
||||
* parameters specific for the POSIX API.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __RTEMS_POSIX_CONFIGURATION_h
|
||||
#define __RTEMS_POSIX_CONFIGURATION_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XXX
|
||||
*
|
||||
* The following records define the Configuration Table. The
|
||||
* information contained in this table is required in all
|
||||
* RTEMS systems, whether single or multiprocessor. This
|
||||
* table primarily defines the following:
|
||||
*
|
||||
* + required number of each object type
|
||||
*/
|
||||
|
||||
/* XXX fix me */
|
||||
typedef int posix_initialization_tasks_table;
|
||||
|
||||
typedef struct {
|
||||
int maximum_threads;
|
||||
int maximum_mutexes;
|
||||
int maximum_condition_variables;
|
||||
int number_of_initialization_tasks;
|
||||
posix_initialization_tasks_table *User_initialization_tasks_table;
|
||||
} posix_api_configuration_table;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
54
cpukit/rtems/include/rtems/rtems/config.h
Normal file
54
cpukit/rtems/include/rtems/rtems/config.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/* config.h
|
||||
*
|
||||
* This include file contains the table of user defined configuration
|
||||
* parameters specific for the RTEMS API.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __RTEMS_RTEMS_CONFIGURATION_h
|
||||
#define __RTEMS_RTEMS_CONFIGURATION_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <rtems/rtems/types.h>
|
||||
#include <rtems/rtems/tasks.h>
|
||||
|
||||
/*
|
||||
* The following records define the Configuration Table. The
|
||||
* information contained in this table is required in all
|
||||
* RTEMS systems, whether single or multiprocessor. This
|
||||
* table primarily defines the following:
|
||||
*
|
||||
* + required number of each object type
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
unsigned32 maximum_tasks;
|
||||
unsigned32 maximum_timers;
|
||||
unsigned32 maximum_semaphores;
|
||||
unsigned32 maximum_message_queues;
|
||||
unsigned32 maximum_partitions;
|
||||
unsigned32 maximum_regions;
|
||||
unsigned32 maximum_ports;
|
||||
unsigned32 maximum_periods;
|
||||
unsigned32 number_of_initialization_tasks;
|
||||
rtems_initialization_tasks_table *User_initialization_tasks_table;
|
||||
} rtems_api_configuration_table;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
@@ -45,6 +45,7 @@ extern "C" {
|
||||
#include <rtems/rtems/eventset.h>
|
||||
#include <rtems/rtems/asr.h>
|
||||
#include <rtems/rtems/attr.h>
|
||||
#include <rtems/rtems/status.h>
|
||||
|
||||
/*
|
||||
* Constant to be used as the ID of current task
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
extern rtems_initialization_tasks_table Initialization_tasks[];
|
||||
extern rtems_driver_address_table Device_drivers[];
|
||||
extern rtems_configuration_table Configuration;
|
||||
@@ -341,9 +340,8 @@ rtems_multiprocessing_table Multiprocessing_configuration = {
|
||||
#endif
|
||||
|
||||
#ifdef CONFIGURE_INIT
|
||||
rtems_configuration_table Configuration = {
|
||||
CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
|
||||
CONFIGURE_EXECUTIVE_RAM_SIZE,
|
||||
|
||||
rtems_api_configuration_table Configuration_RTEMS_API = {
|
||||
CONFIGURE_MAXIMUM_TASKS,
|
||||
CONFIGURE_MAXIMUM_TIMERS,
|
||||
CONFIGURE_MAXIMUM_SEMAPHORES,
|
||||
@@ -352,18 +350,25 @@ rtems_configuration_table Configuration = {
|
||||
CONFIGURE_MAXIMUM_REGIONS,
|
||||
CONFIGURE_MAXIMUM_PORTS,
|
||||
CONFIGURE_MAXIMUM_PERIODS,
|
||||
sizeof (Initialization_tasks)/
|
||||
sizeof(rtems_initialization_tasks_table), /* number of init tasks */
|
||||
Initialization_tasks /* init task(s) table */
|
||||
};
|
||||
|
||||
rtems_configuration_table Configuration = {
|
||||
CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
|
||||
CONFIGURE_EXECUTIVE_RAM_SIZE,
|
||||
CONFIGURE_MAXIMUM_USER_EXTENSIONS,
|
||||
CONFIGURE_MICROSECONDS_PER_TICK,
|
||||
CONFIGURE_TICKS_PER_TIMESLICE,
|
||||
sizeof (Initialization_tasks)/
|
||||
sizeof(rtems_initialization_tasks_table), /* number of init tasks */
|
||||
Initialization_tasks, /* init task(s) table */
|
||||
CONFIGURE_MAXIMUM_DEVICES,
|
||||
sizeof (Device_drivers)/
|
||||
sizeof(rtems_driver_address_table), /* number of device drivers */
|
||||
CONFIGURE_MAXIMUM_DEVICES,
|
||||
Device_drivers, /* pointer to driver table */
|
||||
CONFIGURE_INITIAL_EXTENSIONS, /* pointer to initial extensions */
|
||||
CONFIGURE_MULTIPROCESSING_TABLE /* ptr to MP config table */
|
||||
CONFIGURE_MULTIPROCESSING_TABLE, /* pointer to MP config table */
|
||||
&Configuration_RTEMS_API, /* pointer to RTEMS API config */
|
||||
NULL /* pointer to RTEMS API config */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -21,12 +21,18 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <rtems/posix/config.h>
|
||||
#include <rtems/rtems/config.h>
|
||||
|
||||
/* XXX <rtems/rtems/config.h> should cover these
|
||||
#include <rtems/rtems/status.h>
|
||||
#include <rtems/rtems/types.h>
|
||||
#include <rtems/rtems/tasks.h>
|
||||
*/
|
||||
|
||||
#include <rtems/extension.h>
|
||||
#include <rtems/io.h>
|
||||
#include <rtems/score/mpci.h>
|
||||
#include <rtems/rtems/types.h>
|
||||
#include <rtems/rtems/tasks.h>
|
||||
|
||||
/*
|
||||
* The following records define the Multiprocessor Configuration
|
||||
@@ -50,32 +56,24 @@ typedef struct {
|
||||
* table primarily defines the following:
|
||||
*
|
||||
* + location and size of the RTEMS Workspace
|
||||
* + required number of each object type
|
||||
* + microseconds per clock tick
|
||||
* + clock ticks per task timeslice
|
||||
* + required number of each object type for each API configured
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
void *work_space_start;
|
||||
unsigned32 work_space_size;
|
||||
unsigned32 maximum_tasks;
|
||||
unsigned32 maximum_timers;
|
||||
unsigned32 maximum_semaphores;
|
||||
unsigned32 maximum_message_queues;
|
||||
unsigned32 maximum_partitions;
|
||||
unsigned32 maximum_regions;
|
||||
unsigned32 maximum_ports;
|
||||
unsigned32 maximum_periods;
|
||||
unsigned32 maximum_extensions;
|
||||
unsigned32 microseconds_per_tick;
|
||||
unsigned32 ticks_per_timeslice;
|
||||
unsigned32 number_of_initialization_tasks;
|
||||
rtems_initialization_tasks_table *User_initialization_tasks_table;
|
||||
unsigned32 number_of_device_drivers;
|
||||
unsigned32 maximum_devices;
|
||||
unsigned32 number_of_device_drivers;
|
||||
rtems_driver_address_table *Device_driver_table;
|
||||
rtems_extensions_table *User_extension_table;
|
||||
rtems_multiprocessing_table *User_multiprocessing_table;
|
||||
rtems_api_configuration_table *RTEMS_api_configuration;
|
||||
posix_api_configuration_table *Posix_api_configuration;
|
||||
} rtems_configuration_table;
|
||||
|
||||
/*
|
||||
|
||||
@@ -45,6 +45,10 @@ void _RTEMS_API_Initialize(
|
||||
rtems_configuration_table *configuration_table
|
||||
)
|
||||
{
|
||||
rtems_api_configuration_table *api_configuration;
|
||||
|
||||
api_configuration = configuration_table->RTEMS_api_configuration;
|
||||
|
||||
_Attributes_Handler_initialization();
|
||||
|
||||
_Interrupt_Manager_initialization();
|
||||
@@ -52,38 +56,30 @@ void _RTEMS_API_Initialize(
|
||||
_Multiprocessing_Manager_initialization();
|
||||
|
||||
_RTEMS_tasks_Manager_initialization(
|
||||
configuration_table->maximum_tasks,
|
||||
configuration_table->number_of_initialization_tasks,
|
||||
configuration_table->User_initialization_tasks_table
|
||||
api_configuration->maximum_tasks,
|
||||
api_configuration->number_of_initialization_tasks,
|
||||
api_configuration->User_initialization_tasks_table
|
||||
);
|
||||
|
||||
_Timer_Manager_initialization( configuration_table->maximum_timers );
|
||||
_Timer_Manager_initialization( api_configuration->maximum_timers );
|
||||
|
||||
_Signal_Manager_initialization();
|
||||
|
||||
_Event_Manager_initialization();
|
||||
|
||||
_Message_queue_Manager_initialization(
|
||||
configuration_table->maximum_message_queues
|
||||
api_configuration->maximum_message_queues
|
||||
);
|
||||
|
||||
_Semaphore_Manager_initialization(
|
||||
configuration_table->maximum_semaphores
|
||||
);
|
||||
_Semaphore_Manager_initialization( api_configuration->maximum_semaphores );
|
||||
|
||||
_Partition_Manager_initialization(
|
||||
configuration_table->maximum_partitions
|
||||
);
|
||||
_Partition_Manager_initialization( api_configuration->maximum_partitions );
|
||||
|
||||
_Region_Manager_initialization( configuration_table->maximum_regions );
|
||||
_Region_Manager_initialization( api_configuration->maximum_regions );
|
||||
|
||||
_Dual_ported_memory_Manager_initialization(
|
||||
configuration_table->maximum_ports
|
||||
);
|
||||
_Dual_ported_memory_Manager_initialization( api_configuration->maximum_ports);
|
||||
|
||||
_Rate_monotonic_Manager_initialization(
|
||||
configuration_table->maximum_periods
|
||||
);
|
||||
_Rate_monotonic_Manager_initialization( api_configuration->maximum_periods );
|
||||
}
|
||||
|
||||
/* end of file */
|
||||
|
||||
@@ -109,7 +109,8 @@ extern "C" {
|
||||
(TB)->ticks = TK; }
|
||||
|
||||
#define task_number( tid ) \
|
||||
( rtems_get_index( tid ) - BSP_Configuration.number_of_initialization_tasks )
|
||||
( rtems_get_index( tid ) - \
|
||||
BSP_Configuration.RTEMS_api_configuration->number_of_initialization_tasks )
|
||||
|
||||
static inline rtems_unsigned32 get_ticks_per_second( void )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user