source: rtems/cpukit/include/rtems/rtems/timerdata.h @ 21275b58

Last change on this file since 21275b58 was 21275b58, checked in by Sebastian Huber <sebastian.huber@…>, on Nov 22, 2018 at 6:14:51 PM

score: Static Objects_Information initialization

Statically allocate the objects information together with the initial
set of objects either via <rtems/confdefs.h>. Provide default object
informations with zero objects via librtemscpu.a. This greatly
simplifies the workspace size estimate. RTEMS applications which do not
use the unlimited objects option are easier to debug since all objects
reside now in statically allocated objects of the right types.

Close #3621.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup ClassicTimerImpl
5 *
6 * @brief Classic Partition Manager Data Structures
7 */
8
9/*
10 * COPYRIGHT (c) 1989-2011.
11 * On-Line Applications Research Corporation (OAR).
12 *
13 * Copyright (c) 2009, 2016 embedded brains GmbH.
14 *
15 * The license and distribution terms for this file may be
16 * found in the file LICENSE in this distribution or at
17 * http://www.rtems.org/license/LICENSE.
18 */
19
20#ifndef _RTEMS_RTEMS_TIMERDATA_H
21#define _RTEMS_RTEMS_TIMERDATA_H
22
23#include <rtems/rtems/timer.h>
24#include <rtems/score/objectdata.h>
25#include <rtems/score/watchdog.h>
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31/**
32 * @addtogroup ClassicTimerImpl
33 *
34 * @{
35 */
36
37/**
38 *  The following records define the control block used to manage
39 *  each timer.
40 */
41typedef struct {
42  /** This field is the object management portion of a Timer instance. */
43  Objects_Control  Object;
44  /** This field is the Watchdog instance which will be the scheduled. */
45  Watchdog_Control Ticker;
46  /** This field indicates what type of timer this currently is. */
47  Timer_Classes    the_class;
48  /** This field is the timer service routine. */
49  rtems_timer_service_routine_entry routine;
50  /** This field is the timer service routine user data. */
51  void *user_data;
52  /** This field is the timer interval in ticks or seconds. */
53  Watchdog_Interval initial;
54  /** This field is the timer start time point in ticks. */
55  Watchdog_Interval start_time;
56  /** This field is the timer stop time point in ticks. */
57  Watchdog_Interval stop_time;
58}   Timer_Control;
59
60/**
61 * @brief The Classic Timer objects information.
62 */
63extern Objects_Information  _Timer_Information;
64
65/**
66 * @brief Macro to define the objects information for the Classic Timer
67 * objects.
68 *
69 * This macro should only be used by <rtems/confdefs.h>.
70 *
71 * @param max The configured object maximum (the OBJECTS_UNLIMITED_OBJECTS flag
72 * may be set).
73 */
74#define TIMER_INFORMATION_DEFINE( max ) \
75  OBJECTS_INFORMATION_DEFINE( \
76    _Timer, \
77    OBJECTS_CLASSIC_API, \
78    OBJECTS_RTEMS_TIMERS, \
79    Timer_Control, \
80    max, \
81    OBJECTS_NO_STRING_NAME, \
82    NULL \
83  )
84
85/** @} */
86
87#ifdef __cplusplus
88}
89#endif
90
91#endif
92/* end of include file */
Note: See TracBrowser for help on using the repository browser.