diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-12-14 14:46:10 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-02-03 10:00:52 +0100 |
commit | 565672a257156f78295608afb05157d1c7da7000 (patch) | |
tree | 17baaf2311a45ddd395aeead185fea5afa865820 /cpukit/rtems | |
parent | Optional Extensions initialization (diff) | |
download | rtems-565672a257156f78295608afb05157d1c7da7000.tar.bz2 |
Optional Classic Tasks initialization
Update #2408.
Diffstat (limited to 'cpukit/rtems')
-rw-r--r-- | cpukit/rtems/Makefile.am | 1 | ||||
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/tasksimpl.h | 21 | ||||
-rw-r--r-- | cpukit/rtems/src/taskdata.c | 25 | ||||
-rw-r--r-- | cpukit/rtems/src/tasks.c | 11 |
4 files changed, 11 insertions, 47 deletions
diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am index 1659d92030..d0f3907d4d 100644 --- a/cpukit/rtems/Makefile.am +++ b/cpukit/rtems/Makefile.am @@ -112,7 +112,6 @@ librtems_a_SOURCES += src/taskvariabledelete.c librtems_a_SOURCES += src/taskvariableget.c librtems_a_SOURCES += src/taskvariable_invoke_dtor.c endif -librtems_a_SOURCES += src/taskdata.c librtems_a_SOURCES += src/schedulergetprocessorset.c librtems_a_SOURCES += src/schedulerident.c diff --git a/cpukit/rtems/include/rtems/rtems/tasksimpl.h b/cpukit/rtems/include/rtems/rtems/tasksimpl.h index 5a493d7e35..3f8a87361b 100644 --- a/cpukit/rtems/include/rtems/rtems/tasksimpl.h +++ b/cpukit/rtems/include/rtems/rtems/tasksimpl.h @@ -34,29 +34,10 @@ extern "C" { */ /** - * @brief Instantiate RTEMS Classic API Tasks Data - * - * 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_TASKS_EXTERN -#define RTEMS_TASKS_EXTERN extern -#endif - -/** * The following instantiates the information control block used to * manage this class of objects. */ -RTEMS_TASKS_EXTERN Thread_Information _RTEMS_tasks_Information; - -/** - * @brief RTEMS Task Manager Initialization - * - * This routine initializes all Task Manager related data structures. - */ -void _RTEMS_tasks_Manager_initialization(void); +extern Thread_Information _RTEMS_tasks_Information; /** * @brief RTEMS User Task Initialization diff --git a/cpukit/rtems/src/taskdata.c b/cpukit/rtems/src/taskdata.c deleted file mode 100644 index 505ebcdc74..0000000000 --- a/cpukit/rtems/src/taskdata.c +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @file - * - * @brief Instantiate RTEMS Classic API Tasks Data - * @ingroup ClassicTasks - */ - -/* - * RTEMS Task Manager -- Instantiate Data - * - * 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_TASKS_EXTERN - -#include <rtems/rtems/tasksimpl.h> diff --git a/cpukit/rtems/src/tasks.c b/cpukit/rtems/src/tasks.c index ecd7d4c943..88529991ef 100644 --- a/cpukit/rtems/src/tasks.c +++ b/cpukit/rtems/src/tasks.c @@ -20,6 +20,7 @@ #include <rtems/system.h> #include <rtems/config.h> +#include <rtems/sysinit.h> #include <rtems/rtems/asrimpl.h> #include <rtems/rtems/eventimpl.h> #include <rtems/rtems/signalimpl.h> @@ -34,6 +35,8 @@ #include <rtems/score/wkspace.h> #include <rtems/score/apiext.h> +Thread_Information _RTEMS_tasks_Information; + /* * _RTEMS_tasks_Create_extension * @@ -186,7 +189,7 @@ User_extensions_Control _RTEMS_tasks_User_extensions = { } }; -void _RTEMS_tasks_Manager_initialization(void) +static void _RTEMS_tasks_Manager_initialization(void) { _Thread_Initialize_information( &_RTEMS_tasks_Information, /* object information table */ @@ -228,3 +231,9 @@ void _RTEMS_tasks_Initialize_user_tasks( void ) if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); } + +RTEMS_SYSINIT_ITEM( + _RTEMS_tasks_Manager_initialization, + RTEMS_SYSINIT_CLASSIC_TASKS, + RTEMS_SYSINIT_ORDER_MIDDLE +); |