source: rtems/c/src/exec/rtems/include/rtems/rtems/support.h @ 60b791ad

4.104.114.84.95
Last change on this file since 60b791ad was 60b791ad, checked in by Joel Sherrill <joel.sherrill@…>, on 02/17/98 at 23:46:28

updated copyright to 1998

  • Property mode set to 100644
File size: 1.8 KB
Line 
1/*  support.h
2 *
3 *  This include file contains information about support functions for
4 *  the RTEMS API.
5 *
6 *  COPYRIGHT (c) 1989-1998.
7 *  On-Line Applications Research Corporation (OAR).
8 *  Copyright assigned to U.S. Government, 1994.
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *  http://www.OARcorp.com/rtems/license.html.
13 *
14 *  $Id$
15 */
16
17#ifndef __RTEMS_RTEMS_SUPPORT_h
18#define __RTEMS_RTEMS_SUPPORT_h
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include <rtems/rtems/types.h>
25
26/*
27 *  rtems_build_name
28 *
29 *  DESCRIPTION:
30 *
31 *  This function returns an object name composed of the four characters
32 *  C1, C2, C3, and C4.
33 *
34 *  NOTE:
35 *
36 *  This must be implemented as a macro for use in Configuration Tables.
37 *
38 */
39 
40#define rtems_build_name( _C1, _C2, _C3, _C4 ) \
41  ( (_C1) << 24 | (_C2) << 16 | (_C3) << 8 | (_C4) )
42 
43/*
44 *  rtems_get_class
45 *
46 *  DESCRIPTION:
47 *
48 *  This function returns the class portion of the ID.
49 *
50 */
51 
52#define rtems_get_class( _id ) \
53  _Objects_Get_class( _id )
54 
55/*
56 *  rtems_get_node
57 *
58 *  DESCRIPTION:
59 *
60 *  This function returns the node portion of the ID.
61 *
62 */
63 
64#define rtems_get_node( _id ) \
65  _Objects_Get_node( _id )
66 
67/*
68 *  rtems_get_index
69 *
70 *  DESCRIPTION:
71 *
72 *  This function returns the index portion of the ID.
73 *
74 */
75 
76#define rtems_get_index( _id ) \
77  _Objects_Get_index( _id )
78
79/*
80 *  Time related
81 */
82
83#define RTEMS_MILLISECONDS_TO_MICROSECONDS(_ms) \
84        TOD_MILLISECONDS_TO_MICROSECONDS(_ms)
85#define RTEMS_MILLISECONDS_TO_TICKS(_ms) \
86        TOD_MILLISECONDS_TO_TICKS(_ms)
87#define RTEMS_MICROSECONDS_TO_TICKS(_ms) \
88        TOD_MICROSECONDS_TO_TICKS(_ms)
89
90#ifndef __RTEMS_APPLICATION__
91#include <rtems/rtems/support.inl>
92#endif
93
94#ifdef __cplusplus
95}
96#endif
97
98#endif
99/* end of include file */
Note: See TracBrowser for help on using the repository browser.