source: rtems/cpukit/rtems/inline/rtems/rtems/timer.inl @ 277cc95

4.104.114.84.95
Last change on this file since 277cc95 was 277cc95, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:54:32

2003-09-04 Joel Sherrill <joel@…>

  • include/rtems.h, include/rtems/rtems/asr.h, include/rtems/rtems/attr.h, include/rtems/rtems/cache.h, include/rtems/rtems/clock.h, include/rtems/rtems/config.h, include/rtems/rtems/dpmem.h, include/rtems/rtems/event.h, include/rtems/rtems/eventmp.h, include/rtems/rtems/eventset.h, include/rtems/rtems/intr.h, include/rtems/rtems/message.h, include/rtems/rtems/modes.h, include/rtems/rtems/mp.h, include/rtems/rtems/msgmp.h, include/rtems/rtems/options.h, include/rtems/rtems/part.h, include/rtems/rtems/partmp.h, include/rtems/rtems/ratemon.h, include/rtems/rtems/region.h, include/rtems/rtems/regionmp.h, include/rtems/rtems/rtemsapi.h, include/rtems/rtems/sem.h, include/rtems/rtems/semmp.h, include/rtems/rtems/signal.h, include/rtems/rtems/signalmp.h, include/rtems/rtems/status.h, include/rtems/rtems/support.h, include/rtems/rtems/taskmp.h, include/rtems/rtems/tasks.h, include/rtems/rtems/timer.h, include/rtems/rtems/types.h, inline/rtems/rtems/asr.inl, inline/rtems/rtems/attr.inl, inline/rtems/rtems/dpmem.inl, inline/rtems/rtems/event.inl, inline/rtems/rtems/eventset.inl, inline/rtems/rtems/message.inl, inline/rtems/rtems/modes.inl, inline/rtems/rtems/options.inl, inline/rtems/rtems/part.inl, inline/rtems/rtems/ratemon.inl, inline/rtems/rtems/region.inl, inline/rtems/rtems/sem.inl, inline/rtems/rtems/status.inl, inline/rtems/rtems/support.inl, inline/rtems/rtems/tasks.inl, inline/rtems/rtems/timer.inl, macros/rtems/rtems/asr.inl, macros/rtems/rtems/attr.inl, macros/rtems/rtems/dpmem.inl, macros/rtems/rtems/event.inl, macros/rtems/rtems/eventset.inl, macros/rtems/rtems/message.inl, macros/rtems/rtems/modes.inl, macros/rtems/rtems/options.inl, macros/rtems/rtems/part.inl, macros/rtems/rtems/ratemon.inl, macros/rtems/rtems/region.inl, macros/rtems/rtems/sem.inl, macros/rtems/rtems/status.inl, macros/rtems/rtems/support.inl, macros/rtems/rtems/tasks.inl, macros/rtems/rtems/timer.inl, src/attr.c, src/clockget.c, src/clockset.c, src/clocktick.c, src/dpmem.c, src/dpmemcreate.c, src/dpmemdelete.c, src/dpmemexternal2internal.c, src/dpmemident.c, src/dpmeminternal2external.c, src/event.c, src/eventmp.c, src/eventreceive.c, src/eventseize.c, src/eventsend.c, src/eventsurrender.c, src/eventtimeout.c, src/intr.c, src/intrbody.c, src/intrcatch.c, src/mp.c, src/msg.c, src/msgmp.c, src/msgqallocate.c, src/msgqbroadcast.c, src/msgqcreate.c, src/msgqdelete.c, src/msgqflush.c, src/msgqgetnumberpending.c, src/msgqident.c, src/msgqreceive.c, src/msgqsend.c, src/msgqsubmit.c, src/msgqtranslatereturncode.c, src/msgqurgent.c, src/part.c, src/partcreate.c, src/partdelete.c, src/partgetbuffer.c, src/partident.c, src/partmp.c, src/partreturnbuffer.c, src/ratemon.c, src/ratemoncancel.c, src/ratemoncreate.c, src/ratemondelete.c, src/ratemongetstatus.c, src/ratemonident.c, src/ratemonperiod.c, src/ratemontimeout.c, src/region.c, src/regioncreate.c, src/regiondelete.c, src/regionextend.c, src/regiongetinfo.c, src/regiongetsegment.c, src/regiongetsegmentsize.c, src/regionident.c, src/regionmp.c, src/regionreturnsegment.c, src/rtclock.c, src/rtemsidtoname.c, src/rtemstimer.c, src/sem.c, src/semcreate.c, src/semdelete.c, src/semflush.c, src/semident.c, src/semmp.c, src/semobtain.c, src/semrelease.c, src/semtranslatereturncode.c, src/signal.c, src/signalcatch.c, src/signalmp.c, src/signalsend.c, src/taskcreate.c, src/taskdelete.c, src/taskgetnote.c, src/taskident.c, src/taskinitusers.c, src/taskissuspended.c, src/taskmode.c, src/taskmp.c, src/taskrestart.c, src/taskresume.c, src/tasks.c, src/tasksetnote.c, src/tasksetpriority.c, src/taskstart.c, src/tasksuspend.c, src/taskvariableadd.c, src/taskvariabledelete.c, src/taskvariableget.c, src/taskwakeafter.c, src/taskwakewhen.c, src/timercancel.c, src/timercreate.c, src/timerdelete.c, src/timerfireafter.c, src/timerfirewhen.c, src/timergetinfo.c, src/timerident.c, src/timerreset.c, src/timerserver.c, src/timerserverfireafter.c, src/timerserverfirewhen.c: URL for license changed.
  • Property mode set to 100644
File size: 2.7 KB
Line 
1/*  timer.inl
2 *
3 *  This file contains the static inline implementation of the inlined routines
4 *  from the Timer Manager.
5 *
6 *  COPYRIGHT (c) 1989-1999.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15
16#ifndef __TIMER_inl
17#define __TIMER_inl
18
19/*PAGE
20 *
21 *  _Timer_Allocate
22 *
23 *  DESCRIPTION:
24 *
25 *  This function allocates a timer control block from
26 *  the inactive chain of free timer control blocks.
27 */
28
29RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void )
30{
31  return (Timer_Control *) _Objects_Allocate( &_Timer_Information );
32}
33
34/*PAGE
35 *
36 *  _Timer_Free
37 *
38 *  DESCRIPTION:
39 *
40 *  This routine frees a timer control block to the
41 *  inactive chain of free timer control blocks.
42 */
43
44RTEMS_INLINE_ROUTINE void _Timer_Free (
45  Timer_Control *the_timer
46)
47{
48  _Objects_Free( &_Timer_Information, &the_timer->Object );
49}
50
51/*PAGE
52 *
53 *  _Timer_Get
54 *
55 *  DESCRIPTION:
56 *
57 *  This function maps timer IDs to timer control blocks.
58 *  If ID corresponds to a local timer, then it returns
59 *  the timer control pointer which maps to ID and location
60 *  is set to OBJECTS_LOCAL.  Otherwise, location is set
61 *  to OBJECTS_ERROR and the returned value is undefined.
62 */
63
64RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
65  Objects_Id         id,
66  Objects_Locations *location
67)
68{
69  return (Timer_Control *)
70    _Objects_Get( &_Timer_Information, id, location );
71}
72
73/*PAGE
74 *
75 *  _Timer_Is_interval_class
76 *
77 *  DESCRIPTION:
78 *
79 *  This function returns TRUE if the class is that of an INTERVAL
80 *  timer, and FALSE otherwise.
81 */
82
83RTEMS_INLINE_ROUTINE boolean _Timer_Is_interval_class (
84  Timer_Classes the_class
85)
86{
87  return (the_class == TIMER_INTERVAL) || (the_class == TIMER_INTERVAL_ON_TASK);
88}
89
90/*PAGE
91 *
92 *  _Timer_Is_time_of_day_class
93 *
94 *  DESCRIPTION:
95 *
96 *  This function returns TRUE if the class is that of an INTERVAL
97 *  timer, and FALSE otherwise.
98 */
99
100RTEMS_INLINE_ROUTINE boolean _Timer_Is_timer_of_day_class (
101  Timer_Classes the_class
102)
103{
104  return ( the_class == TIMER_TIME_OF_DAY );
105}
106
107/*PAGE
108 *
109 *  _Timer_Is_dormant_class
110 *
111 *  DESCRIPTION:
112 *
113 *  This function returns TRUE if the class is that of a DORMANT
114 *  timer, and FALSE otherwise.
115 */
116
117RTEMS_INLINE_ROUTINE boolean _Timer_Is_dormant_class (
118  Timer_Classes the_class
119)
120{
121  return ( the_class == TIMER_DORMANT );
122}
123
124/*PAGE
125 *
126 *  _Timer_Is_null
127 *
128 *  DESCRIPTION:
129 *
130 *  This function returns TRUE if the_timer is NULL and FALSE otherwise.
131 */
132
133RTEMS_INLINE_ROUTINE boolean _Timer_Is_null (
134  Timer_Control *the_timer
135)
136{
137  return ( the_timer == NULL );
138}
139
140#endif
141/* end of include file */
Note: See TracBrowser for help on using the repository browser.