1 | /* ratemon.inl |
---|
2 | * |
---|
3 | * This file contains the static inline implementation of the inlined |
---|
4 | * routines in the Rate Monotonic Manager. |
---|
5 | * |
---|
6 | * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. |
---|
7 | * On-Line Applications Research Corporation (OAR). |
---|
8 | * All rights assigned to U.S. Government, 1994. |
---|
9 | * |
---|
10 | * This material may be reproduced by or for the U.S. Government pursuant |
---|
11 | * to the copyright license under the clause at DFARS 252.227-7013. This |
---|
12 | * notice must appear in all copies of this file and its derivatives. |
---|
13 | * |
---|
14 | * $Id$ |
---|
15 | */ |
---|
16 | |
---|
17 | #ifndef __RATE_MONOTONIC_inl |
---|
18 | #define __RATE_MONOTONIC_inl |
---|
19 | |
---|
20 | /*PAGE |
---|
21 | * |
---|
22 | * _Rate_monotonic_Allocate |
---|
23 | * |
---|
24 | */ |
---|
25 | |
---|
26 | STATIC INLINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) |
---|
27 | { |
---|
28 | return (Rate_monotonic_Control *) |
---|
29 | _Objects_Allocate( &_Rate_monotonic_Information ); |
---|
30 | } |
---|
31 | |
---|
32 | /*PAGE |
---|
33 | * |
---|
34 | * _Rate_monotonic_Free |
---|
35 | * |
---|
36 | */ |
---|
37 | |
---|
38 | STATIC INLINE void _Rate_monotonic_Free ( |
---|
39 | Rate_monotonic_Control *the_period |
---|
40 | ) |
---|
41 | { |
---|
42 | _Objects_Free( &_Rate_monotonic_Information, &the_period->Object ); |
---|
43 | } |
---|
44 | |
---|
45 | /*PAGE |
---|
46 | * |
---|
47 | * _Rate_monotonic_Get |
---|
48 | * |
---|
49 | */ |
---|
50 | |
---|
51 | STATIC INLINE Rate_monotonic_Control *_Rate_monotonic_Get ( |
---|
52 | Objects_Id id, |
---|
53 | Objects_Locations *location |
---|
54 | ) |
---|
55 | { |
---|
56 | return (Rate_monotonic_Control *) |
---|
57 | _Objects_Get( &_Rate_monotonic_Information, id, location ); |
---|
58 | } |
---|
59 | |
---|
60 | /*PAGE |
---|
61 | * |
---|
62 | * _Rate_monotonic_Is_active |
---|
63 | * |
---|
64 | */ |
---|
65 | |
---|
66 | STATIC INLINE boolean _Rate_monotonic_Is_active ( |
---|
67 | Rate_monotonic_Control *the_period |
---|
68 | ) |
---|
69 | { |
---|
70 | return (the_period->state == RATE_MONOTONIC_ACTIVE); |
---|
71 | } |
---|
72 | |
---|
73 | /*PAGE |
---|
74 | * |
---|
75 | * _Rate_monotonic_Is_inactive |
---|
76 | * |
---|
77 | */ |
---|
78 | |
---|
79 | STATIC INLINE boolean _Rate_monotonic_Is_inactive ( |
---|
80 | Rate_monotonic_Control *the_period |
---|
81 | ) |
---|
82 | { |
---|
83 | return (the_period->state == RATE_MONOTONIC_INACTIVE); |
---|
84 | } |
---|
85 | |
---|
86 | /*PAGE |
---|
87 | * |
---|
88 | * _Rate_monotonic_Is_expired |
---|
89 | * |
---|
90 | */ |
---|
91 | |
---|
92 | STATIC INLINE boolean _Rate_monotonic_Is_expired ( |
---|
93 | Rate_monotonic_Control *the_period |
---|
94 | ) |
---|
95 | { |
---|
96 | return (the_period->state == RATE_MONOTONIC_EXPIRED); |
---|
97 | } |
---|
98 | |
---|
99 | /*PAGE |
---|
100 | * |
---|
101 | * _Rate_monotonic_Is_null |
---|
102 | * |
---|
103 | */ |
---|
104 | |
---|
105 | STATIC INLINE boolean _Rate_monotonic_Is_null ( |
---|
106 | Rate_monotonic_Control *the_period |
---|
107 | ) |
---|
108 | { |
---|
109 | return (the_period == NULL); |
---|
110 | } |
---|
111 | |
---|
112 | #endif |
---|
113 | /* end of include file */ |
---|