source: rtems/c/src/exec/itron/include/itronsys/msgbuffer.h @ 352c9b2

4.104.114.84.95
Last change on this file since 352c9b2 was 352c9b2, checked in by Joel Sherrill <joel.sherrill@…>, on 11/09/99 at 22:07:23

This patch adds the basic framework for the ITRON 3.0 API implementation
for RTEMS.

  • Property mode set to 100644
File size: 2.6 KB
Line 
1/*
2 *  The license and distribution terms for this file may be
3 *  found in the file LICENSE in this distribution or at
4 *  http://www.OARcorp.com/rtems/license.html.
5 *
6 *  $Id$
7 */
8
9#ifndef __ITRON_MESSAGEBUFFER_h_
10#define __ITRON_MESSAGEBUFFER_h_
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16/*
17 *  Create Message Buffer (cre_mbf) Structure
18 */
19
20typedef struct t_cmbf {
21  VP    exinf;    /* extended information */
22  ATR   mbfatr;   /* messagebuffer attributes */
23  INT   bufsz;    /* messagebuffer size */
24  INT   maxmsz;   /* maximum size of messages */
25  /* additional information may be included depending on the implementation */
26} T_CMBF;
27
28/*
29 *  mbfatr
30 */
31
32#define TA_TFIFO   0x00   /* tasks waiting to receive messages are handled
33                                 by FIFO */
34#define TA_TPRI    0x01   /* tasks waiting to receive messages are handled
35                                 by priority */
36
37/*
38 *  mbfid
39 */
40
41#define TMBF_OS   (-4)   /* messagebuffer used for OS error log */
42#define TMBF_DB   (-3)   /* messagebuffer used for debugging */
43
44/*
45 *  Reference Message Buffer (ref_mbf) Structure
46 */
47
48typedef struct t_rmbf {
49  VP        exinf;     /* extended information */
50  BOOL_ID   wtsk;      /* indicates whether or not there is a */
51                       /* task waiting to receive a message */
52  BOOL_ID   stsk;      /* indicates whether or not there is a */
53                       /* task waiting to send a message */
54  INT       msgsz;     /* size of message to be sent next */
55  INT       frbufsz;   /* size of free buffer */
56  /* additional information may be included depending on the implementation */
57} T_RMBF;
58
59/*
60 *  Message Buffer Functions
61 */
62
63/*
64 *  cre_mbf - Create MessageBuffer
65 */
66
67ER cre_mbf(
68  ID mbfid,
69  T_CMBF *pk_cmbf
70);
71
72/*
73 *  del_mbf - Delete MessageBuffer
74 */
75
76ER del_mbf(
77  ID mbfid
78);
79
80/*
81 *  snd_mbf - Send Message to MessageBuffer
82 */
83
84ER snd_mbf(
85  ID mbfid,
86  VP msg,
87  INT msgsz
88);
89
90/*
91 *  psnd_mbf - Poll and Send Message to MessageBuffer
92 */
93
94ER psnd_mbf(
95  ID mbfid,
96  VP msg,
97  INT msgsz
98);
99
100/*
101 *  tsnd_mbf - Send Message to MessageBuffer with Timeout
102 */
103
104ER tsnd_mbf(
105  ID mbfid,
106  VP msg,
107  INT msgsz,
108  TMO tmout
109);
110
111/*
112 *  rcv_mbf - Receive Message from MessageBuffer
113 */
114
115ER rcv_mbf(
116  VP msg,
117  INT *p_msgsz,
118  ID mbfid
119);
120
121/*
122 *  prcv_mbf - Poll and Receive Message from MessageBuffer
123 */
124
125ER prcv_mbf(
126  VP msg,
127  INT *p_msgsz,
128  ID mbfid
129);
130
131/*
132 *  trcv_mbf - Receive Message from MessageBuffer with Timeout
133 */
134
135ER trcv_mbf(
136  VP msg,
137  INT *p_msgsz,
138  ID mbfid,
139  TMO tmout
140);
141
142/*
143 *  ref_mbf - Reference MessageBuffer Status
144 */
145
146ER ref_mbf(
147  T_RMBF *pk_rmbf,
148  ID mbfid
149);
150
151#ifdef __cplusplus
152}
153#endif
154
155#endif
156/* end of include file */
157
Note: See TracBrowser for help on using the repository browser.