Changeset 565672a in rtems


Ignore:
Timestamp:
Dec 14, 2015, 1:46:10 PM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
26335844
Parents:
92bb345
git-author:
Sebastian Huber <sebastian.huber@…> (12/14/15 13:46:10)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/03/16 09:00:52)
Message:

Optional Classic Tasks initialization

Update #2408.

Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/Makefile.am

    r92bb345 r565672a  
    113113librtems_a_SOURCES += src/taskvariable_invoke_dtor.c
    114114endif
    115 librtems_a_SOURCES += src/taskdata.c
    116115librtems_a_SOURCES += src/schedulergetprocessorset.c
    117116librtems_a_SOURCES += src/schedulerident.c
  • cpukit/rtems/include/rtems/rtems/tasksimpl.h

    r92bb345 r565672a  
    3535
    3636/**
    37  *  @brief Instantiate RTEMS Classic API Tasks Data
    38  *
    39  *  This constant is defined to extern most of the time when using
    40  *  this header file.  However by defining it to nothing, the data
    41  *  declared in this header file can be instantiated.  This is done
    42  *  in a single per manager file.
    43  */
    44 #ifndef RTEMS_TASKS_EXTERN
    45 #define RTEMS_TASKS_EXTERN extern
    46 #endif
    47 
    48 /**
    4937 *  The following instantiates the information control block used to
    5038 *  manage this class of objects.
    5139 */
    52 RTEMS_TASKS_EXTERN Thread_Information _RTEMS_tasks_Information;
    53 
    54 /**
    55  *  @brief RTEMS Task Manager Initialization
    56  *
    57  *  This routine initializes all Task Manager related data structures.
    58  */
    59 void _RTEMS_tasks_Manager_initialization(void);
     40extern Thread_Information _RTEMS_tasks_Information;
    6041
    6142/**
  • cpukit/rtems/src/tasks.c

    r92bb345 r565672a  
    2121#include <rtems/system.h>
    2222#include <rtems/config.h>
     23#include <rtems/sysinit.h>
    2324#include <rtems/rtems/asrimpl.h>
    2425#include <rtems/rtems/eventimpl.h>
     
    3435#include <rtems/score/wkspace.h>
    3536#include <rtems/score/apiext.h>
     37
     38Thread_Information _RTEMS_tasks_Information;
    3639
    3740/*
     
    187190};
    188191
    189 void _RTEMS_tasks_Manager_initialization(void)
     192static void _RTEMS_tasks_Manager_initialization(void)
    190193{
    191194  _Thread_Initialize_information(
     
    229232    (*_RTEMS_tasks_Initialize_user_tasks_p)();
    230233}
     234
     235RTEMS_SYSINIT_ITEM(
     236  _RTEMS_tasks_Manager_initialization,
     237  RTEMS_SYSINIT_CLASSIC_TASKS,
     238  RTEMS_SYSINIT_ORDER_MIDDLE
     239);
  • cpukit/sapi/src/rtemsapi.c

    r92bb345 r565672a  
    2929#include <rtems/rtems/barrierimpl.h>
    3030#include <rtems/rtems/clock.h>
    31 #include <rtems/rtems/tasksimpl.h>
    3231#include <rtems/rtems/dpmemimpl.h>
    3332#include <rtems/rtems/eventimpl.h>
     
    4241void _RTEMS_API_Initialize(void)
    4342{
    44   _RTEMS_tasks_Manager_initialization();
    4543  _Timer_Manager_initialization();
    4644  _Signal_Manager_initialization();
  • cpukit/score/include/rtems/sysinit.h

    r92bb345 r565672a  
    3232#define RTEMS_SYSINIT_DATA_STRUCTURES            000301
    3333#define RTEMS_SYSINIT_USER_EXTENSIONS            000320
     34#define RTEMS_SYSINIT_CLASSIC_TASKS              000340
    3435#define RTEMS_SYSINIT_IDLE_THREADS               000380
    3536#define RTEMS_SYSINIT_BSP_LIBC                   000400
  • testsuites/sptests/spsysinit01/init.c

    r92bb345 r565672a  
    2626
    2727#include <rtems/extensionimpl.h>
     28#include <rtems/rtems/tasksimpl.h>
    2829#include <rtems/score/apimutex.h>
    2930#include <rtems/score/sysstate.h>
     
    4445  USER_EXTENSIONS_PRE,
    4546  USER_EXTENSIONS_POST,
     47  CLASSIC_TASKS_PRE,
     48  CLASSIC_TASKS_POST,
    4649  IDLE_THREADS_PRE,
    4750  IDLE_THREADS_POST,
     
    149152}
    150153
     154FIRST(RTEMS_SYSINIT_CLASSIC_TASKS)
     155{
     156  assert(_RTEMS_tasks_Information.Objects.maximum == 0);
     157  next_step(CLASSIC_TASKS_PRE);
     158}
     159
     160LAST(RTEMS_SYSINIT_CLASSIC_TASKS)
     161{
     162  assert(_RTEMS_tasks_Information.Objects.maximum != 0);
     163  next_step(CLASSIC_TASKS_POST);
     164}
     165
    151166FIRST(RTEMS_SYSINIT_IDLE_THREADS)
    152167{
Note: See TracChangeset for help on using the changeset viewer.