source: rtems/cpukit/rtems/include/rtems/rtems/dpmem.h @ c627b2a3

4.104.114.84.95
Last change on this file since c627b2a3 was c627b2a3, checked in by Joel Sherrill <joel.sherrill@…>, on 05/28/96 at 21:40:52

split the inclusion of "EXTERN" data based on whether it was sapi,
score, rtems api, or posix api related.

  • Property mode set to 100644
File size: 3.8 KB
Line 
1/*  dpmem.h
2 *
3 *  This include file contains all the constants and structures associated
4 *  with the Dual Ported Memory Manager. This manager provides a mechanism
5 *  for converting addresses between internal and external representations
6 *  for multiple dual-ported memory areas.
7 *
8 *  Directives provided are:
9 *
10 *     + create a port
11 *     + get ID of a port
12 *     + delete a port
13 *     + convert external to internal address
14 *     + convert internal to external address
15 *
16 *
17 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
18 *  On-Line Applications Research Corporation (OAR).
19 *  All rights assigned to U.S. Government, 1994.
20 *
21 *  This material may be reproduced by or for the U.S. Government pursuant
22 *  to the copyright license under the clause at DFARS 252.227-7013.  This
23 *  notice must appear in all copies of this file and its derivatives.
24 *
25 *  $Id$
26 */
27
28#ifndef __RTEMS_DUAL_PORTED_MEMORY_h
29#define __RTEMS_DUAL_PORTED_MEMORY_h
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#include <rtems/score/object.h>
36
37/*
38 *  The following structure defines the port control block.  Each port
39 *  has a control block associated with it.  This control block contains
40 *  all information required to support the port related operations.
41 */
42
43typedef struct {
44  Objects_Control  Object;
45  void            *internal_base; /* base internal address */
46  void            *external_base; /* base external address */
47  unsigned32       length;        /* length of dual-ported area */
48}   Dual_ported_memory_Control;
49
50/*
51 *  The following define the internal Dual Ported Memory information.
52 */
53
54RTEMS_EXTERN Objects_Information  _Dual_ported_memory_Information;
55
56/*
57 *  _Dual_ported_memory_Manager_initialization
58 *
59 *  DESCRIPTION:
60 *
61 *  This routine performs the initialization necessary for this manager.
62 */
63
64void _Dual_ported_memory_Manager_initialization(
65  unsigned32 maximum_ports
66);
67
68/*
69 *  rtems_port_create
70 *
71 *  DESCRIPTION:
72 *
73 *  This routine implements the rtems_port_create directive.  The port
74 *  will have the name name.  The port maps onto an area of dual ported
75 *  memory of length bytes which has internal_start and external_start
76 *  as the internal and external starting addresses, respectively.
77 *  It returns the id of the created port in ID.
78 */
79
80rtems_status_code rtems_port_create(
81  rtems_name    name,
82  void         *internal_start,
83  void         *external_start,
84  unsigned32    length,
85  Objects_Id   *id
86);
87
88/*
89 *  rtems_port_ident
90 *
91 *  DESCRIPTION:
92 *
93 *  This routine implements the rtems_port_ident directive.  This directive
94 *  returns the port ID associated with name.  If more than one port is
95 *  named name, then the port to which the ID belongs is arbitrary.
96 */
97
98rtems_status_code rtems_port_ident(
99  rtems_name    name,
100  Objects_Id   *id
101);
102
103/*
104 *  rtems_port_delete
105 *
106 *  DESCRIPTION:
107 *
108 *  This routine implements the rtems_port_delete directive.  It deletes
109 *  the port associated with ID.
110 */
111
112rtems_status_code rtems_port_delete(
113  Objects_Id id
114);
115
116/*
117 *  rtems_port_external_to_internal
118 *
119 *  DESCRIPTION:
120 *
121 *  This routine implements the rtems_port_external_to_internal directive.
122 *  It returns the internal port address which maps to the provided
123 *  external port address for the specified port ID.
124 */
125
126rtems_status_code rtems_port_external_to_internal(
127  Objects_Id   id,
128  void        *external,
129  void       **internal
130);
131
132/*
133 *  rtems_port_internal_to_external
134 *
135 *  DESCRIPTION:
136 *
137 *  This routine implements the Port_internal_to_external directive.
138 *  It returns the external port address which maps to the provided
139 *  internal port address for the specified port ID.
140 */
141
142rtems_status_code rtems_port_internal_to_external(
143  Objects_Id   id,
144  void        *internal,
145  void       **external
146);
147
148#ifndef __RTEMS_APPLICATION__
149#include <rtems/rtems/dpmem.inl>
150#endif
151
152#ifdef __cplusplus
153}
154#endif
155
156#endif
157/* end of include file */
Note: See TracBrowser for help on using the repository browser.