OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [doc/] [itron3.0/] [mailbox.t] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
@c
2
@c  COPYRIGHT (c) 1988-2002.
3
@c  On-Line Applications Research Corporation (OAR).
4
@c  All rights reserved.
5
@c
6
@c  This is the chapter from the RTEMS ITRON User's Guide that
7
@c  documents the services provided by the mailbox
8
@c  manager.
9
@c
10
@c  mailbox.t,v 1.13 2002/01/17 21:47:45 joel Exp
11
@c
12
 
13
 
14
@chapter Mailbox Manager
15
 
16
@section Introduction
17
 
18
The
19
mailbox manager is basically a linked list, hidden by the super core message queue and consists of a control block, a private structure. The control block comprises of the create mailbox structure, the message structure and the reference mailbox structure.
20
 
21
The services provided by the mailbox manager are:
22
 
23
@itemize @bullet
24
@item @code{cre_mbx} - Create Mailbox
25
@item @code{del_mbx} - Delete Mailbox
26
@item @code{snd_msg} - Send Message to Mailbox
27
@item @code{rcv_msg} - Receive Message from Mailbox
28
@item @code{prcv_msg} - Poll and Receive Message from Mailbox
29
@item @code{trcv_msg} - Receive Message from Mailbox with Timeout
30
@item @code{ref_mbx} - Reference Mailbox Status
31
@end itemize
32
 
33
 
34
@section Background
35
 
36
@section Operations
37
 
38
@section System Calls
39
 
40
This section details the mailbox manager's services.
41
A subsection is dedicated to each of this manager's services
42
and describes the calling sequence, related constants, usage,
43
and status codes.
44
 
45
 
46
@c
47
@c  cre_mbx
48
@c
49
 
50
@page
51
 
52
@subsection cre_mbx - Create Mailbox
53
 
54
@subheading CALLING SEQUENCE:
55
 
56
@ifset is-C
57
@example
58
ER cre_mbx(
59
  ID      mbxid,
60
  T_CMBX *pk_cmbx
61
);
62
@end example
63
@end ifset
64
 
65
@ifset is-Ada
66
@end ifset
67
 
68
@subheading STATUS CODES:
69
 
70
@code{E_OK} - Normal completion@*
71
@code{E_NOMEM} - Insufficient memory@*
72
@code{E_ID} - Invalid ID number@*
73
@code{E_RSATR} - Reserved attribute@*
74
@code{E_OBJ} - Invalid object state@*
75
@code{E_OACV} - Object access violation@*
76
@code{E_PAR} - Parameter error
77
 
78
 
79
@subheading DESCRIPTION:
80
 
81
Allocated a control area/buffer space for mailbox with some ID.
82
 
83
@example
84
                User area:      +ve ids
85
                System area:    -ve ids
86
@end example
87
 
88
User may specify if its FIFO or priority level queue.
89
Assumes shared memory b/w communicating processes.
90
Initializes core message queue for this mbox.
91
 
92
@subheading NOTES:
93
 
94
NONE
95
 
96
 
97
@c
98
@c  del_mbx
99
@c
100
 
101
@page
102
 
103
@subsection del_mbx - Delete Mailbox
104
 
105
@subheading CALLING SEQUENCE:
106
 
107
@ifset is-C
108
@example
109
ER del_mbx(
110
  ID mbxid
111
);
112
@end example
113
@end ifset
114
 
115
@ifset is-Ada
116
@end ifset
117
 
118
@subheading STATUS CODES:
119
 
120
@code{E_OK} - Normal completion@*
121
@code{E_ID} - Invalid ID number@*
122
@code{E_NOEXS} - Object does not exist@*
123
@code{E_OACV} - Object access violation
124
 
125
@subheading DESCRIPTION:
126
 
127
Specified by the ID, cleans up all data structures and control blocks.
128
 
129
@subheading NOTES:
130
 
131
NONE
132
 
133
 
134
@c
135
@c  snd_msg
136
@c
137
 
138
@page
139
 
140
@subsection snd_msg - Send Message to Mailbox
141
 
142
@subheading CALLING SEQUENCE:
143
 
144
@ifset is-C
145
@example
146
ER snd_msg(
147
  ID     mbxid,
148
  T_MSG *pk_msg
149
);
150
@end example
151
@end ifset
152
 
153
@ifset is-Ada
154
@end ifset
155
 
156
@subheading STATUS CODES:
157
 
158
@code{E_OK} - Normal completion@*
159
@code{E_ID} - Invalid ID number@*
160
@code{E_NOEXS} - Object does not exist@*
161
@code{E_OACV} - Object access violation@*
162
@code{E_QOVR} - Queueing or nesting overflow
163
 
164
@subheading DESCRIPTION:
165
 
166
Sends the address of message to mbox having a given id, any waiting tasks (blocked tasks) will be woken up. It supports non-blocking send.
167
 
168
@subheading NOTES:
169
 
170
NONE
171
 
172
 
173
@c
174
@c  rcv_msg
175
@c
176
 
177
@page
178
 
179
@subsection rcv_msg - Receive Message from Mailbox
180
 
181
@subheading CALLING SEQUENCE:
182
 
183
@ifset is-C
184
@example
185
ER rcv_msg(
186
  T_MSG **ppk_msg,
187
  ID      mbxid
188
);
189
@end example
190
@end ifset
191
 
192
@ifset is-Ada
193
@end ifset
194
 
195
@subheading STATUS CODES:
196
 
197
@code{E_OK} - Normal completion@*
198
@code{E_ID} - Invalid ID number@*
199
@code{E_NOEXS} - Object does not exist@*
200
@code{E_OACV} - Object access violation@*
201
@code{E_PAR} - Parameter error@*
202
@code{E_DLT} - The object being waited for was deleted@*
203
@code{E_RLWAI} - WAIT state was forcibly released@*
204
@code{E_CTX} - Context error
205
 
206
@subheading DESCRIPTION:
207
 
208
If there is no message then receiver blocks, if not empty then it takes the first message of the queue.
209
 
210
@subheading NOTES:
211
 
212
NONE
213
 
214
 
215
@c
216
@c  prcv_msg
217
@c
218
 
219
@page
220
 
221
@subsection prcv_msg - Poll and Receive Message from Mailbox
222
 
223
@subheading CALLING SEQUENCE:
224
 
225
@ifset is-C
226
@example
227
ER prcv_msg(
228
  T_MSG **ppk_msg,
229
  ID      mbxid
230
);
231
@end example
232
@end ifset
233
 
234
@ifset is-Ada
235
@end ifset
236
 
237
@subheading STATUS CODES:
238
 
239
@code{E_OK} - Normal completion@*
240
@code{E_ID} - Invalid ID number@*
241
@code{E_NOEXS} - Object does not exist@*
242
@code{E_OACV} - Object access violation@*
243
@code{E_PAR} - Parameter error@*
244
@code{E_DLT} - The object being waited for was deleted@*
245
@code{E_RLWAI} - WAIT state was forcibly released@*
246
@code{E_CTX} - Context error@*
247
 
248
@subheading DESCRIPTION:
249
 
250
Poll and receive message from mailbox.
251
 
252
@subheading NOTES:
253
 
254
NONE
255
 
256
 
257
@c
258
@c  trcv_msg
259
@c
260
 
261
@page
262
 
263
@subsection trcv_msg - Receive Message from Mailbox with Timeout
264
 
265
@subheading CALLING SEQUENCE:
266
 
267
@ifset is-C
268
@example
269
ER trcv_msg(
270
  T_MSG **ppk_msg,
271
  ID      mbxid,
272
  TMO     tmout
273
);
274
@end example
275
@end ifset
276
 
277
@ifset is-Ada
278
@end ifset
279
 
280
@subheading STATUS CODES:
281
 
282
@code{E_OK} - Normal completion@*
283
@code{E_ID} - Invalid ID number@*
284
@code{E_NOEXS} - Object does not exist@*
285
@code{E_OACV} - Object access violation@*
286
@code{E_PAR} - Parameter error@*
287
@code{E_DLT} - The object being waited for was deleted@*
288
@code{E_RLWAI} - WAIT state was forcibly released@*
289
@code{E_CTX} - Context error
290
 
291
@subheading DESCRIPTION:
292
 
293
Blocking receive with a maximum timeout.
294
 
295
@subheading NOTES:
296
 
297
NONE
298
 
299
 
300
@c
301
@c  ref_mbx
302
@c
303
 
304
@page
305
 
306
@subsection ref_mbx - Reference Mailbox Status
307
 
308
@subheading CALLING SEQUENCE:
309
 
310
@ifset is-C
311
@example
312
ER ref_mbx(
313
  T_RMBX *pk_rmbx,
314
  ID      mbxid
315
);
316
@end example
317
@end ifset
318
 
319
@ifset is-Ada
320
@end ifset
321
 
322
@subheading STATUS CODES:
323
 
324
@code{E_OK} - Normal completion@*
325
@code{E_ID} - Invalid ID number@*
326
@code{E_NOEXS} - Object does not exist@*
327
@code{E_OACV} - Object access violation@*
328
@code{E_PAR} - Parameter error
329
 
330
@subheading DESCRIPTION:
331
 
332
Supports non-blocking receive. If there are no messages, it returns -1. Also returns id of the next process waiting on a message.
333
 
334
@subheading NOTES:
335
 
336
NONE
337
 
338
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.