Changeset 26335844 in rtems


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

Optional Classic Timer initialization

Update #2408.

Files:
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/Makefile.am

    r565672a r26335844  
    172172librtems_a_SOURCES += src/timerserverfireafter.c
    173173librtems_a_SOURCES += src/timerserverfirewhen.c
    174 librtems_a_SOURCES += src/rtemstimerdata.c
    175174
    176175## MESSAGE_QUEUE_C_FILES
  • cpukit/rtems/include/rtems/rtems/timerimpl.h

    r565672a r26335844  
    3636 */
    3737
    38 /**
    39  *  @brief Instantiate RTEMS Timer Data
    40  *
    41  *  This constant is defined to extern most of the time when using
    42  *  this header file.  However by defining it to nothing, the data
    43  *  declared in this header file can be instantiated.  This is done
    44  *  in a single per manager file.
    45  */
    46 #ifndef RTEMS_TIMER_EXTERN
    47 #define RTEMS_TIMER_EXTERN extern
    48 #endif
    49 
    5038typedef struct Timer_server_Control Timer_server_Control;
    5139
     
    129117 * This value is @c NULL when the default timer server is not initialized.
    130118 */
    131 RTEMS_TIMER_EXTERN Timer_server_Control *volatile _Timer_server;
     119extern Timer_server_Control *volatile _Timer_server;
    132120
    133121/**
     
    135123 *  this class of objects.
    136124 */
    137 RTEMS_TIMER_EXTERN Objects_Information  _Timer_Information;
    138 
    139 /**
    140  *  @brief Timer Manager Initialization
    141  *
    142  *  This routine performs the initialization necessary for this manager.
    143  */
    144 void _Timer_Manager_initialization(void);
     125extern Objects_Information  _Timer_Information;
    145126
    146127/**
  • cpukit/rtems/src/rtemstimer.c

    r565672a r26335844  
    2121#include <rtems/system.h>
    2222#include <rtems/config.h>
     23#include <rtems/sysinit.h>
    2324#include <rtems/rtems/status.h>
    2425#include <rtems/rtems/support.h>
    25 #include <rtems/score/thread.h>
    2626#include <rtems/rtems/timerimpl.h>
    27 #include <rtems/score/watchdog.h>
    2827
    29 void _Timer_Manager_initialization(void)
     28Timer_server_Control *volatile _Timer_server;
     29
     30Objects_Information  _Timer_Information;
     31
     32static void _Timer_Manager_initialization(void)
    3033{
    3134  _Objects_Initialize_information(
     
    4447#endif
    4548  );
     49}
    4650
    47   /*
    48    *  Initialize the pointer to the default timer server control block to NULL
    49    *  indicating that task-based timer support is not initialized.
    50    */
    51 
    52   _Timer_server = NULL;
    53 }
     51RTEMS_SYSINIT_ITEM(
     52  _Timer_Manager_initialization,
     53  RTEMS_SYSINIT_CLASSIC_TIMER,
     54  RTEMS_SYSINIT_ORDER_MIDDLE
     55);
  • cpukit/sapi/src/rtemsapi.c

    r565672a r26335844  
    3737#include <rtems/rtems/semimpl.h>
    3838#include <rtems/rtems/signalimpl.h>
    39 #include <rtems/rtems/timerimpl.h>
    4039
    4140void _RTEMS_API_Initialize(void)
    4241{
    43   _Timer_Manager_initialization();
    4442  _Signal_Manager_initialization();
    4543  _Event_Manager_initialization();
  • cpukit/score/include/rtems/sysinit.h

    r565672a r26335844  
    3333#define RTEMS_SYSINIT_USER_EXTENSIONS            000320
    3434#define RTEMS_SYSINIT_CLASSIC_TASKS              000340
     35#define RTEMS_SYSINIT_CLASSIC_TIMER              000341
    3536#define RTEMS_SYSINIT_IDLE_THREADS               000380
    3637#define RTEMS_SYSINIT_BSP_LIBC                   000400
  • testsuites/sptests/sp43/init.c

    r565672a r26335844  
    413413
    414414  puts( "rtems_object_get_class_information - Classic Timers - OK" );
     415  sc = rtems_timer_create(0, NULL);
     416  fatal_directive_status(
     417    sc,
     418    RTEMS_INVALID_NAME,
     419    "rtems_timer_create"
     420  );
    415421  sc = rtems_object_get_class_information(
    416422             OBJECTS_CLASSIC_API, OBJECTS_RTEMS_TIMERS, &info );
  • testsuites/sptests/sp43/sp43.scn

    r565672a r26335844  
    1 *** TEST 43 ***
    2 RTEMS Version: rtems-4.10.99.0(SPARC/w/FPU/sis)
     1*** BEGIN OF TEST SP 43 ***
     2RTEMS Version: rtems-4.11.99.0(SPARC/w/FPU/sis)
    33rtems_object_get_classic_name - INVALID_ADDRESS
    44rtems_object_get_classic_name - INVALID_ID (bad index)
     
    3030rtems_object_get_name returned (N   ) for init task
    3131rtems_object_set_name - change name of init task to ()
    32 *    - name returned by rtems_object_get_classic_name
    33 rtems_object_get_name returned () for init task
     32     - name returned by rtems_object_get_classic_name
     33rtems_object_get_name returned (    ) for init task
    3434rtems_object_set_name - change name of init task to (N-0x07-0x09-1)
    3535N**1 - name returned by rtems_object_get_classic_name
     
    9292rtems_semaphore_obtain - good but uncreated ID - INVALID_ID - OK
    9393rtems_object_get_classic_name - bad API pointer - INVALID_ID
    94 *** END OF TEST 43 ***
     94*** END OF TEST SP 43 ***
  • testsuites/sptests/spsysinit01/init.c

    r565672a r26335844  
    2727#include <rtems/extensionimpl.h>
    2828#include <rtems/rtems/tasksimpl.h>
     29#include <rtems/rtems/timerimpl.h>
    2930#include <rtems/score/apimutex.h>
    3031#include <rtems/score/sysstate.h>
     
    4748  CLASSIC_TASKS_PRE,
    4849  CLASSIC_TASKS_POST,
     50  CLASSIC_TIMER_PRE,
     51  CLASSIC_TIMER_POST,
    4952  IDLE_THREADS_PRE,
    5053  IDLE_THREADS_POST,
     
    164167}
    165168
     169FIRST(RTEMS_SYSINIT_CLASSIC_TIMER)
     170{
     171  assert(_Timer_Information.maximum == 0);
     172  next_step(CLASSIC_TIMER_PRE);
     173}
     174
     175LAST(RTEMS_SYSINIT_CLASSIC_TIMER)
     176{
     177  assert(_Timer_Information.maximum != 0);
     178  next_step(CLASSIC_TIMER_POST);
     179}
     180
    166181FIRST(RTEMS_SYSINIT_IDLE_THREADS)
    167182{
     
    251266#define CONFIGURE_MAXIMUM_TASKS 1
    252267
     268#define CONFIGURE_MAXIMUM_TIMERS 1
     269
    253270#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
    254271
Note: See TracChangeset for help on using the changeset viewer.