source: rtems/cpukit/rtems/inline/rtems/rtems/timer.inl @ f9293df

4.104.114.95
Last change on this file since f9293df was f9293df, checked in by Joel Sherrill <joel.sherrill@…>, on 04/18/08 at 20:08:08

2008-04-18 Joel Sherrill <joel.sherrill@…>

  • rtems/Doxyfile, rtems/include/rtems/rtems/asr.h, rtems/include/rtems/rtems/attr.h, rtems/include/rtems/rtems/barrier.h, rtems/include/rtems/rtems/barriermp.h, rtems/include/rtems/rtems/cache.h, rtems/include/rtems/rtems/config.h, rtems/include/rtems/rtems/dpmem.h, rtems/include/rtems/rtems/event.h, rtems/include/rtems/rtems/eventmp.h, rtems/include/rtems/rtems/eventset.h, rtems/include/rtems/rtems/intr.h, rtems/include/rtems/rtems/message.h, rtems/include/rtems/rtems/modes.h, rtems/include/rtems/rtems/mp.h, rtems/include/rtems/rtems/msgmp.h, rtems/include/rtems/rtems/options.h, rtems/include/rtems/rtems/part.h, rtems/include/rtems/rtems/partmp.h, rtems/include/rtems/rtems/ratemon.h, rtems/include/rtems/rtems/region.h, rtems/include/rtems/rtems/regionmp.h, rtems/include/rtems/rtems/rtemsapi.h, rtems/include/rtems/rtems/sem.h, rtems/include/rtems/rtems/semmp.h, rtems/include/rtems/rtems/signal.h, rtems/include/rtems/rtems/signalmp.h, rtems/include/rtems/rtems/status.h, rtems/include/rtems/rtems/support.h, rtems/include/rtems/rtems/taskmp.h, rtems/include/rtems/rtems/tasks.h, rtems/include/rtems/rtems/timer.h, rtems/include/rtems/rtems/types.h, rtems/inline/rtems/rtems/asr.inl, rtems/inline/rtems/rtems/attr.inl, rtems/inline/rtems/rtems/barrier.inl, rtems/inline/rtems/rtems/dpmem.inl, rtems/inline/rtems/rtems/event.inl, rtems/inline/rtems/rtems/message.inl, rtems/inline/rtems/rtems/modes.inl, rtems/inline/rtems/rtems/options.inl, rtems/inline/rtems/rtems/part.inl, rtems/inline/rtems/rtems/ratemon.inl, rtems/inline/rtems/rtems/region.inl, rtems/inline/rtems/rtems/sem.inl, rtems/inline/rtems/rtems/status.inl, rtems/inline/rtems/rtems/support.inl, rtems/inline/rtems/rtems/timer.inl: More Doxygen improvements.
  • Property mode set to 100644
File size: 2.7 KB
Line 
1/**
2 * @file rtems/rtems/timer.inl
3 *
4 *  This file contains the static inline implementation of the inlined routines
5 *  from the Timer Manager.
6 */
7
8/*  COPYRIGHT (c) 1989-2008.
9 *  On-Line Applications Research Corporation (OAR).
10 *
11 *  The license and distribution terms for this file may be
12 *  found in the file LICENSE in this distribution or at
13 *  http://www.rtems.com/license/LICENSE.
14 *
15 *  $Id$
16 */
17
18#ifndef _RTEMS_RTEMS_TIMER_INL
19#define _RTEMS_RTEMS_TIMER_INL
20
21/**
22 *  @addtogroup ClassicTimer
23 *  @{
24 */
25
26/**
27 *  @brief Timer_Allocate
28 *
29 *  This function allocates a timer control block from
30 *  the inactive chain of free timer control blocks.
31 */
32RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void )
33{
34  return (Timer_Control *) _Objects_Allocate( &_Timer_Information );
35}
36
37/**
38 *  @brief Timer_Free
39 *
40 *  This routine frees a timer control block to the
41 *  inactive chain of free timer control blocks.
42 */
43RTEMS_INLINE_ROUTINE void _Timer_Free (
44  Timer_Control *the_timer
45)
46{
47  _Objects_Free( &_Timer_Information, &the_timer->Object );
48}
49
50/**
51 *  @brief Timer_Get
52 *
53 *  This function maps timer IDs to timer control blocks.
54 *  If ID corresponds to a local timer, then it returns
55 *  the timer control pointer which maps to ID and location
56 *  is set to OBJECTS_LOCAL.  Otherwise, location is set
57 *  to OBJECTS_ERROR and the returned value is undefined.
58 */
59RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
60  Objects_Id         id,
61  Objects_Locations *location
62)
63{
64  return (Timer_Control *)
65    _Objects_Get( &_Timer_Information, id, location );
66}
67
68/**
69 *  @brief Timer_Is_interval_class
70 *
71 *  This function returns TRUE if the class is that of an INTERVAL
72 *  timer, and FALSE otherwise.
73 */
74RTEMS_INLINE_ROUTINE boolean _Timer_Is_interval_class (
75  Timer_Classes the_class
76)
77{
78  return (the_class == TIMER_INTERVAL) || (the_class == TIMER_INTERVAL_ON_TASK);
79}
80
81/**
82 *  @brief Timer_Is_time_of_day_class
83 *
84 *  This function returns TRUE if the class is that of an INTERVAL
85 *  timer, and FALSE otherwise.
86 */
87RTEMS_INLINE_ROUTINE boolean _Timer_Is_timer_of_day_class (
88  Timer_Classes the_class
89)
90{
91  return ( the_class == TIMER_TIME_OF_DAY );
92}
93
94/**
95 *  @brief Timer_Is_dormant_class
96 *
97 *  This function returns TRUE if the class is that of a DORMANT
98 *  timer, and FALSE otherwise.
99 */
100RTEMS_INLINE_ROUTINE boolean _Timer_Is_dormant_class (
101  Timer_Classes the_class
102)
103{
104  return ( the_class == TIMER_DORMANT );
105}
106
107/**
108 *  @brief Timer_Is_null
109 *
110 *  This function returns TRUE if the_timer is NULL and FALSE otherwise.
111 */
112RTEMS_INLINE_ROUTINE boolean _Timer_Is_null (
113  Timer_Control *the_timer
114)
115{
116  return ( the_timer == NULL );
117}
118
119/**@}*/
120
121#endif
122/* end of include file */
Note: See TracBrowser for help on using the repository browser.