4 /*==========================================================================*
5 * Types relating to messages. *
6 *==========================================================================*/
13 typedef struct {int m1i1
, m1i2
, m1i3
; char *m1p1
, *m1p2
, *m1p3
;} mess_1
;
14 typedef struct {int m2i1
, m2i2
, m2i3
; long m2l1
, m2l2
; char *m2p1
;
16 typedef struct {int m3i1
, m3i2
; char *m3p1
; char m3ca1
[M3_STRING
];} mess_3
;
17 typedef struct {long m4l1
, m4l2
, m4l3
, m4l4
, m4l5
;} mess_4
;
18 typedef struct {short m5c1
, m5c2
; int m5i1
, m5i2
; long m5l1
, m5l2
, m5l3
;}mess_5
;
19 typedef struct {long m6l1
, m6l2
, m6l3
; short m6s1
, m6s2
, m6s3
; char m6c1
, m6c2
;
20 char *m6p1
, *m6p2
;} mess_6
;
21 typedef struct {int m7i1
, m7i2
, m7i3
, m7i4
; char *m7p1
, *m7p2
;} mess_7
;
22 typedef struct {int m8i1
, m8i2
; char *m8p1
, *m8p2
, *m8p3
, *m8p4
;} mess_8
;
25 endpoint_t m_source
; /* who sent the message */
26 int m_type
; /* what kind of message is it */
39 /* The following defines provide names for useful members. */
40 #define m1_i1 m_u.m_m1.m1i1
41 #define m1_i2 m_u.m_m1.m1i2
42 #define m1_i3 m_u.m_m1.m1i3
43 #define m1_p1 m_u.m_m1.m1p1
44 #define m1_p2 m_u.m_m1.m1p2
45 #define m1_p3 m_u.m_m1.m1p3
47 #define m2_i1 m_u.m_m2.m2i1
48 #define m2_i2 m_u.m_m2.m2i2
49 #define m2_i3 m_u.m_m2.m2i3
50 #define m2_l1 m_u.m_m2.m2l1
51 #define m2_l2 m_u.m_m2.m2l2
52 #define m2_p1 m_u.m_m2.m2p1
54 #define m2_s1 m_u.m_m2.m2s1
56 #define m3_i1 m_u.m_m3.m3i1
57 #define m3_i2 m_u.m_m3.m3i2
58 #define m3_p1 m_u.m_m3.m3p1
59 #define m3_ca1 m_u.m_m3.m3ca1
61 #define m4_l1 m_u.m_m4.m4l1
62 #define m4_l2 m_u.m_m4.m4l2
63 #define m4_l3 m_u.m_m4.m4l3
64 #define m4_l4 m_u.m_m4.m4l4
65 #define m4_l5 m_u.m_m4.m4l5
67 #define m5_c1 m_u.m_m5.m5c1
68 #define m5_c2 m_u.m_m5.m5c2
69 #define m5_i1 m_u.m_m5.m5i1
70 #define m5_i2 m_u.m_m5.m5i2
71 #define m5_l1 m_u.m_m5.m5l1
72 #define m5_l2 m_u.m_m5.m5l2
73 #define m5_l3 m_u.m_m5.m5l3
75 #define m6_l1 m_u.m_m6.m6l1
76 #define m6_l2 m_u.m_m6.m6l2
77 #define m6_l3 m_u.m_m6.m6l3
78 #define m6_s1 m_u.m_m6.m6s1
79 #define m6_s2 m_u.m_m6.m6s2
80 #define m6_s3 m_u.m_m6.m6s3
81 #define m6_c1 m_u.m_m6.m6c1
82 #define m6_c2 m_u.m_m6.m6c2
83 #define m6_p1 m_u.m_m6.m6p1
84 #define m6_p2 m_u.m_m6.m6p2
86 #define m7_i1 m_u.m_m7.m7i1
87 #define m7_i2 m_u.m_m7.m7i2
88 #define m7_i3 m_u.m_m7.m7i3
89 #define m7_i4 m_u.m_m7.m7i4
90 #define m7_p1 m_u.m_m7.m7p1
91 #define m7_p2 m_u.m_m7.m7p2
93 #define m8_i1 m_u.m_m8.m8i1
94 #define m8_i2 m_u.m_m8.m8i2
95 #define m8_p1 m_u.m_m8.m8p1
96 #define m8_p2 m_u.m_m8.m8p2
97 #define m8_p3 m_u.m_m8.m8p3
98 #define m8_p4 m_u.m_m8.m8p4
100 /*==========================================================================*
101 * Minix run-time system (IPC). *
102 *==========================================================================*/
104 /* Hide names to avoid name space pollution. */
106 #define notify _notify
107 #define sendrec _sendrec
108 #define receive _receive
111 _PROTOTYPE( int echo
, (message
*m_ptr
) );
112 _PROTOTYPE( int notify
, (endpoint_t dest
) );
113 _PROTOTYPE( int sendrec
, (endpoint_t src_dest
, message
*m_ptr
) );
114 _PROTOTYPE( int receive
, (endpoint_t src
, message
*m_ptr
) );
115 _PROTOTYPE( int send
, (endpoint_t dest
, message
*m_ptr
) );
117 #define ipc_request _ipc_request
118 #define ipc_reply _ipc_reply
119 #define ipc_notify _ipc_notify
120 #define ipc_select _ipc_select
122 _PROTOTYPE( int ipc_request
, (int dst
, message
*m_ptr
) );
123 _PROTOTYPE( int ipc_reply
, (int dst
, message
*m_ptr
) );
124 _PROTOTYPE( int ipc_notify
, (int dst
, long event_set
) );
125 _PROTOTYPE( int ipc_receive
, (int src
, long events
, message
*m_ptr
) );