source: rtems/doc/tools/bmenu/address.h @ 0660b4f8

4.104.114.84.95
Last change on this file since 0660b4f8 was 0660b4f8, checked in by Joel Sherrill <joel.sherrill@…>, on 11/16/99 at 19:50:56

Changed copyright date to 1999.

  • Property mode set to 100644
File size: 2.3 KB
Line 
1/*  address.h
2 *
3 *  This include file contains the information required to manipulate
4 *  physical addresses.
5 *
6 *  COPYRIGHT (c) 1988-1999.
7 *  On-Line Applications Research Corporation (OAR).
8 *  All rights reserved.
9 *
10 *  $Id$
11 */
12
13#ifndef __ADDRESSES_h
14#define __ADDRESSES_h
15
16/*
17 *  _Addresses_Add_offset
18 *
19 *  DESCRIPTION:
20 *
21 *  This function is used to add an offset to a base address.
22 *  It returns the resulting address.  This address is typically
23 *  converted to an access type before being used further.
24 */
25
26STATIC INLINE void *_Addresses_Add_offset (
27  void       *base,
28  unsigned32  offset
29);
30
31/*
32 *  _Addresses_Subtract_offset
33 *
34 *  DESCRIPTION:
35 *
36 *  This function is used to subtract an offset from a base
37 *  address.  It returns the resulting address.  This address is
38 *  typically converted to an access type before being used further.
39 */
40
41STATIC INLINE void *_Addresses_Subtract_offset(
42  void       *base,
43  unsigned32  offset
44);
45
46/*
47 *  _Addresses_Add
48 *
49 *  DESCRIPTION:
50 *
51 *  This function is used to add two addresses.  It returns the
52 *  resulting address.  This address is typically converted to an
53 *  access type before being used further.
54 */
55
56STATIC INLINE void *_Addresses_Add (
57  void *left,
58  void *right
59);
60
61/*
62 *  _Addresses_Subtract
63 *
64 *  DESCRIPTION:
65 *
66 *  This function is used to subtract two addresses.  It returns the
67 *  resulting offset.
68 */
69
70STATIC INLINE unsigned32 _Addresses_Subtract (
71  void *left,
72  void *right
73);
74
75/*
76 *  _Addresses_Is_aligned
77 *
78 *  DESCRIPTION:
79 *
80 *  This function returns TRUE if the given address is correctly
81 *  aligned for this processor and FALSE otherwise.  Proper alignment
82 *  is based on correctness and efficiency.
83 */
84
85STATIC INLINE boolean _Addresses_Is_aligned (
86  void *address
87);
88
89/*
90 *  _Addresses_Is_in_range
91 *
92 *  DESCRIPTION:
93 *
94 *  This function returns TRUE if the given address is within the
95 *  memory range specified and FALSE otherwise.  base is the address
96 *  of the first byte in the memory range and limit is the address
97 *  of the last byte in the memory range.  The base address is
98 *  assumed to be lower than the limit address.
99 */
100
101STATIC INLINE boolean _Addresses_Is_in_range (
102  void *address,
103  void *base,
104  void *limit
105);
106
107#include "address.inl"
108
109#endif
110/* end of include file */
Note: See TracBrowser for help on using the repository browser.