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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [itron/] [include/] [itronsys/] [mbox.h] - Blame information for rev 173

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
2
 *  COPYRIGHT (c) 1989-1999.
3
 *  On-Line Applications Research Corporation (OAR).
4
 *
5
 *  The license and distribution terms for this file may be
6
 *  found in the file LICENSE in this distribution or at
7
 *  http://www.OARcorp.com/rtems/license.html.
8
 *
9
 *  $Id: mbox.h,v 1.2 2001-09-27 11:59:12 chris Exp $
10
 */
11
 
12
#ifndef __ITRON_MBOX_h_
13
#define __ITRON_MBOX_h_
14
 
15
#ifdef __cplusplus
16
extern "C" {
17
#endif
18
 
19
/*
20
 *  Create Mailbox (cre_mbx) Structure
21
 */
22
 
23
typedef struct t_cmbx {
24
  VP    exinf;    /* extended information */
25
  ATR   mbxatr;   /* mailbox attributes */
26
  /* Following is implementation-dependent function */
27
  INT   bufcnt;   /* maximum number of messages to let pend */
28
  /* additional information may be included depending on the implementation */
29
} T_CMBX;
30
 
31
/*
32
 *  mbxatr
33
 */
34
 
35
#define TA_TFIFO   0x00   /* waiting tasks are handled by FIFO */
36
#define TA_TPRI    0x01   /* waiting tasks are handled by priority */
37
#define TA_MFIFO   0x00   /* messages are handled by FIFO */
38
#define TA_MPRI    0x02   /* messages are handled by priority */
39
 
40
typedef struct t_msg {
41
  /*
42
   *  A region (header) reserved by the OS may be included first
43
   *  depending on the implementation.
44
   *
45
   *  NOTE: The first two fields are RTEMS specific.
46
   */
47
 
48
  INT       msgpri;   /* priority of each message */
49
  /* VB   msgcont[];  XXX */
50
  unsigned8 msgcont[1];
51
} T_MSG;
52
 
53
/*
54
 *  Reference Mailbox (ref_mbx) Structure
55
 */
56
 
57
typedef struct t_rmbx {
58
  VP        exinf;    /* extended information */
59
  BOOL_ID   wtsk;     /* indicates whether or not there is a waiting task */
60
  T_MSG    *pk_msg;   /* message to be sent next */
61
  /* additional information may be included depending on the implementation */
62
} T_RMBX;
63
 
64
/*
65
 *  Mailbox Functions
66
 */
67
 
68
/*
69
 *  cre_mbx - Create Mailbox
70
 */
71
 
72
ER cre_mbx(
73
  ID      mbxid,
74
  T_CMBX *pk_cmbx
75
);
76
 
77
/*
78
 *  del_mbx - Delete Mailbox
79
 */
80
 
81
ER del_mbx(
82
  ID mbxid
83
);
84
 
85
/*
86
 *  snd_msg - Send Message to Mailbox
87
 */
88
 
89
ER snd_msg(
90
  ID     mbxid,
91
  T_MSG *pk_msg
92
);
93
 
94
/*
95
 *  rcv_msg - Receive Message from Mailbox
96
 */
97
 
98
ER rcv_msg(
99
  T_MSG **ppk_msg,
100
  ID      mbxid
101
);
102
 
103
/*
104
 *  prcv_msg - Poll and Receive Message from Mailbox
105
 */
106
 
107
ER prcv_msg(
108
  T_MSG **ppk_msg,
109
  ID      mbxid
110
);
111
 
112
/*
113
 *  trcv_msg - Receive Message from Mailbox with Timeout
114
 */
115
 
116
ER trcv_msg(
117
  T_MSG **ppk_msg,
118
  ID      mbxid,
119
  TMO     tmout
120
);
121
 
122
/*
123
 *  ref_mbx - Reference Mailbox Status
124
 */
125
 
126
ER ref_mbx(
127
  T_RMBX *pk_rmbx,
128
  ID      mbxid
129
);
130
 
131
 
132
#ifdef __cplusplus
133
}
134
#endif
135
 
136
#endif
137
/* end of include file */
138
 

powered by: WebSVN 2.1.0

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