1 | /*
|
---|
2 | * Copyright (c) 2006 Ondrej Palkovsky
|
---|
3 | * All rights reserved.
|
---|
4 | *
|
---|
5 | * Redistribution and use in source and binary forms, with or without
|
---|
6 | * modification, are permitted provided that the following conditions
|
---|
7 | * are met:
|
---|
8 | *
|
---|
9 | * - Redistributions of source code must retain the above copyright
|
---|
10 | * notice, this list of conditions and the following disclaimer.
|
---|
11 | * - Redistributions in binary form must reproduce the above copyright
|
---|
12 | * notice, this list of conditions and the following disclaimer in the
|
---|
13 | * documentation and/or other materials provided with the distribution.
|
---|
14 | * - The name of the author may not be used to endorse or promote products
|
---|
15 | * derived from this software without specific prior written permission.
|
---|
16 | *
|
---|
17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
---|
18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
---|
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
---|
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
---|
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
---|
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
---|
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
---|
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
---|
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
---|
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
---|
27 | */
|
---|
28 |
|
---|
29 | /** @addtogroup libc
|
---|
30 | * @{
|
---|
31 | */
|
---|
32 | /** @file
|
---|
33 | */
|
---|
34 |
|
---|
35 | #if ((defined(LIBC_IPC_H_)) && (!defined(LIBC_ASYNC_OBSOLETE_C_)))
|
---|
36 | #error Do not intermix low-level IPC interface and async framework
|
---|
37 | #endif
|
---|
38 |
|
---|
39 | #ifndef LIBC_ASYNC_OBSOLETE_H_
|
---|
40 | #define LIBC_ASYNC_OBSOLETE_H_
|
---|
41 |
|
---|
42 | #define async_obsolete_send_0(phoneid, method, dataptr) \
|
---|
43 | async_obsolete_send_fast((phoneid), (method), 0, 0, 0, 0, (dataptr))
|
---|
44 | #define async_obsolete_send_1(phoneid, method, arg1, dataptr) \
|
---|
45 | async_obsolete_send_fast((phoneid), (method), (arg1), 0, 0, 0, (dataptr))
|
---|
46 | #define async_obsolete_send_2(phoneid, method, arg1, arg2, dataptr) \
|
---|
47 | async_obsolete_send_fast((phoneid), (method), (arg1), (arg2), 0, 0, (dataptr))
|
---|
48 | #define async_obsolete_send_3(phoneid, method, arg1, arg2, arg3, dataptr) \
|
---|
49 | async_obsolete_send_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (dataptr))
|
---|
50 | #define async_obsolete_send_4(phoneid, method, arg1, arg2, arg3, arg4, dataptr) \
|
---|
51 | async_obsolete_send_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
|
---|
52 | (dataptr))
|
---|
53 | #define async_obsolete_send_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, dataptr) \
|
---|
54 | async_obsolete_send_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
|
---|
55 | (arg5), (dataptr))
|
---|
56 |
|
---|
57 | extern aid_t async_obsolete_send_fast(int phoneid, sysarg_t method, sysarg_t arg1,
|
---|
58 | sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, ipc_call_t *dataptr);
|
---|
59 | extern aid_t async_obsolete_send_slow(int phoneid, sysarg_t method, sysarg_t arg1,
|
---|
60 | sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5,
|
---|
61 | ipc_call_t *dataptr);
|
---|
62 |
|
---|
63 | #define async_obsolete_req_0_0(phoneid, method) \
|
---|
64 | async_obsolete_req_fast((phoneid), (method), 0, 0, 0, 0, NULL, NULL, NULL, NULL, \
|
---|
65 | NULL)
|
---|
66 | #define async_obsolete_req_0_1(phoneid, method, r1) \
|
---|
67 | async_obsolete_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), NULL, NULL, NULL, \
|
---|
68 | NULL)
|
---|
69 | #define async_obsolete_req_0_2(phoneid, method, r1, r2) \
|
---|
70 | async_obsolete_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), NULL, NULL, \
|
---|
71 | NULL)
|
---|
72 | #define async_obsolete_req_0_3(phoneid, method, r1, r2, r3) \
|
---|
73 | async_obsolete_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), (r3), NULL, \
|
---|
74 | NULL)
|
---|
75 | #define async_obsolete_req_0_4(phoneid, method, r1, r2, r3, r4) \
|
---|
76 | async_obsolete_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), (r3), (r4), \
|
---|
77 | NULL)
|
---|
78 | #define async_obsolete_req_0_5(phoneid, method, r1, r2, r3, r4, r5) \
|
---|
79 | async_obsolete_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), (r3), (r4), \
|
---|
80 | (r5))
|
---|
81 | #define async_obsolete_req_1_0(phoneid, method, arg1) \
|
---|
82 | async_obsolete_req_fast((phoneid), (method), (arg1), 0, 0, 0, NULL, NULL, NULL, \
|
---|
83 | NULL, NULL)
|
---|
84 | #define async_obsolete_req_1_1(phoneid, method, arg1, rc1) \
|
---|
85 | async_obsolete_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), NULL, NULL, \
|
---|
86 | NULL, NULL)
|
---|
87 | #define async_obsolete_req_1_2(phoneid, method, arg1, rc1, rc2) \
|
---|
88 | async_obsolete_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), NULL, \
|
---|
89 | NULL, NULL)
|
---|
90 | #define async_obsolete_req_1_3(phoneid, method, arg1, rc1, rc2, rc3) \
|
---|
91 | async_obsolete_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), (rc3), \
|
---|
92 | NULL, NULL)
|
---|
93 | #define async_obsolete_req_1_4(phoneid, method, arg1, rc1, rc2, rc3, rc4) \
|
---|
94 | async_obsolete_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), (rc3), \
|
---|
95 | (rc4), NULL)
|
---|
96 | #define async_obsolete_req_1_5(phoneid, method, arg1, rc1, rc2, rc3, rc4, rc5) \
|
---|
97 | async_obsolete_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), (rc3), \
|
---|
98 | (rc4), (rc5))
|
---|
99 | #define async_obsolete_req_2_0(phoneid, method, arg1, arg2) \
|
---|
100 | async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, NULL, NULL, \
|
---|
101 | NULL, NULL, NULL)
|
---|
102 | #define async_obsolete_req_2_1(phoneid, method, arg1, arg2, rc1) \
|
---|
103 | async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), NULL, \
|
---|
104 | NULL, NULL, NULL)
|
---|
105 | #define async_obsolete_req_2_2(phoneid, method, arg1, arg2, rc1, rc2) \
|
---|
106 | async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \
|
---|
107 | NULL, NULL, NULL)
|
---|
108 | #define async_obsolete_req_2_3(phoneid, method, arg1, arg2, rc1, rc2, rc3) \
|
---|
109 | async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \
|
---|
110 | (rc3), NULL, NULL)
|
---|
111 | #define async_obsolete_req_2_4(phoneid, method, arg1, arg2, rc1, rc2, rc3, rc4) \
|
---|
112 | async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \
|
---|
113 | (rc3), (rc4), NULL)
|
---|
114 | #define async_obsolete_req_2_5(phoneid, method, arg1, arg2, rc1, rc2, rc3, rc4, rc5) \
|
---|
115 | async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \
|
---|
116 | (rc3), (rc4), (rc5))
|
---|
117 | #define async_obsolete_req_3_0(phoneid, method, arg1, arg2, arg3) \
|
---|
118 | async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, NULL, NULL, \
|
---|
119 | NULL, NULL, NULL)
|
---|
120 | #define async_obsolete_req_3_1(phoneid, method, arg1, arg2, arg3, rc1) \
|
---|
121 | async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \
|
---|
122 | NULL, NULL, NULL, NULL)
|
---|
123 | #define async_obsolete_req_3_2(phoneid, method, arg1, arg2, arg3, rc1, rc2) \
|
---|
124 | async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \
|
---|
125 | (rc2), NULL, NULL, NULL)
|
---|
126 | #define async_obsolete_req_3_3(phoneid, method, arg1, arg2, arg3, rc1, rc2, rc3) \
|
---|
127 | async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \
|
---|
128 | (rc2), (rc3), NULL, NULL)
|
---|
129 | #define async_obsolete_req_3_4(phoneid, method, arg1, arg2, arg3, rc1, rc2, rc3, rc4) \
|
---|
130 | async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \
|
---|
131 | (rc2), (rc3), (rc4), NULL)
|
---|
132 | #define async_obsolete_req_3_5(phoneid, method, arg1, arg2, arg3, rc1, rc2, rc3, rc4, \
|
---|
133 | rc5) \
|
---|
134 | async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \
|
---|
135 | (rc2), (rc3), (rc4), (rc5))
|
---|
136 | #define async_obsolete_req_4_0(phoneid, method, arg1, arg2, arg3, arg4) \
|
---|
137 | async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), NULL, \
|
---|
138 | NULL, NULL, NULL, NULL)
|
---|
139 | #define async_obsolete_req_4_1(phoneid, method, arg1, arg2, arg3, arg4, rc1) \
|
---|
140 | async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), (rc1), \
|
---|
141 | NULL, NULL, NULL, NULL)
|
---|
142 | #define async_obsolete_req_4_2(phoneid, method, arg1, arg2, arg3, arg4, rc1, rc2) \
|
---|
143 | async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), (rc1), \
|
---|
144 | (rc2), NULL, NULL, NULL)
|
---|
145 | #define async_obsolete_req_4_3(phoneid, method, arg1, arg2, arg3, arg4, rc1, rc2, rc3) \
|
---|
146 | async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), (rc1), \
|
---|
147 | (rc2), (rc3), NULL, NULL)
|
---|
148 | #define async_obsolete_req_4_4(phoneid, method, arg1, arg2, arg3, arg4, rc1, rc2, rc3, \
|
---|
149 | rc4) \
|
---|
150 | async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
|
---|
151 | (rc1), (rc2), (rc3), (rc4), NULL)
|
---|
152 | #define async_obsolete_req_4_5(phoneid, method, arg1, arg2, arg3, arg4, rc1, rc2, rc3, \
|
---|
153 | rc4, rc5) \
|
---|
154 | async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
|
---|
155 | (rc1), (rc2), (rc3), (rc4), (rc5))
|
---|
156 | #define async_obsolete_req_5_0(phoneid, method, arg1, arg2, arg3, arg4, arg5) \
|
---|
157 | async_obsolete_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
|
---|
158 | (arg5), NULL, NULL, NULL, NULL, NULL)
|
---|
159 | #define async_obsolete_req_5_1(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1) \
|
---|
160 | async_obsolete_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
|
---|
161 | (arg5), (rc1), NULL, NULL, NULL, NULL)
|
---|
162 | #define async_obsolete_req_5_2(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1, rc2) \
|
---|
163 | async_obsolete_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
|
---|
164 | (arg5), (rc1), (rc2), NULL, NULL, NULL)
|
---|
165 | #define async_obsolete_req_5_3(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1, rc2, \
|
---|
166 | rc3) \
|
---|
167 | async_obsolete_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
|
---|
168 | (arg5), (rc1), (rc2), (rc3), NULL, NULL)
|
---|
169 | #define async_obsolete_req_5_4(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1, rc2, \
|
---|
170 | rc3, rc4) \
|
---|
171 | async_obsolete_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
|
---|
172 | (arg5), (rc1), (rc2), (rc3), (rc4), NULL)
|
---|
173 | #define async_obsolete_req_5_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1, rc2, \
|
---|
174 | rc3, rc4, rc5) \
|
---|
175 | async_obsolete_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
|
---|
176 | (arg5), (rc1), (rc2), (rc3), (rc4), (rc5))
|
---|
177 |
|
---|
178 | extern sysarg_t async_obsolete_req_fast(int phoneid, sysarg_t method, sysarg_t arg1,
|
---|
179 | sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t *r1, sysarg_t *r2,
|
---|
180 | sysarg_t *r3, sysarg_t *r4, sysarg_t *r5);
|
---|
181 | extern sysarg_t async_obsolete_req_slow(int phoneid, sysarg_t method, sysarg_t arg1,
|
---|
182 | sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5, sysarg_t *r1,
|
---|
183 | sysarg_t *r2, sysarg_t *r3, sysarg_t *r4, sysarg_t *r5);
|
---|
184 |
|
---|
185 | extern void async_obsolete_msg_0(int, sysarg_t);
|
---|
186 | extern void async_obsolete_msg_1(int, sysarg_t, sysarg_t);
|
---|
187 | extern void async_obsolete_msg_2(int, sysarg_t, sysarg_t, sysarg_t);
|
---|
188 | extern void async_obsolete_msg_3(int, sysarg_t, sysarg_t, sysarg_t, sysarg_t);
|
---|
189 | extern void async_obsolete_msg_4(int, sysarg_t, sysarg_t, sysarg_t, sysarg_t, sysarg_t);
|
---|
190 | extern void async_obsolete_msg_5(int, sysarg_t, sysarg_t, sysarg_t, sysarg_t, sysarg_t,
|
---|
191 | sysarg_t);
|
---|
192 |
|
---|
193 | extern int async_obsolete_forward_slow(ipc_callid_t, int, sysarg_t, sysarg_t, sysarg_t,
|
---|
194 | sysarg_t, sysarg_t, sysarg_t, unsigned int);
|
---|
195 |
|
---|
196 | extern int async_obsolete_connect_to_me(int, sysarg_t, sysarg_t, sysarg_t,
|
---|
197 | async_client_conn_t, void *);
|
---|
198 | extern int async_obsolete_connect_me_to(int, sysarg_t, sysarg_t, sysarg_t);
|
---|
199 | extern int async_obsolete_connect_me_to_blocking(int, sysarg_t, sysarg_t, sysarg_t);
|
---|
200 | extern int async_obsolete_hangup(int);
|
---|
201 |
|
---|
202 | #define async_obsolete_share_in_start_0_0(phoneid, dst, size) \
|
---|
203 | async_obsolete_share_in_start((phoneid), (dst), (size), 0, NULL)
|
---|
204 | #define async_obsolete_share_in_start_0_1(phoneid, dst, size, flags) \
|
---|
205 | async_obsolete_share_in_start((phoneid), (dst), (size), 0, (flags))
|
---|
206 | #define async_obsolete_share_in_start_1_0(phoneid, dst, size, arg) \
|
---|
207 | async_obsolete_share_in_start((phoneid), (dst), (size), (arg), NULL)
|
---|
208 | #define async_obsolete_share_in_start_1_1(phoneid, dst, size, arg, flags) \
|
---|
209 | async_obsolete_share_in_start((phoneid), (dst), (size), (arg), (flags))
|
---|
210 |
|
---|
211 | extern int async_obsolete_share_in_start(int, void *, size_t, sysarg_t,
|
---|
212 | unsigned int *);
|
---|
213 | extern int async_obsolete_share_out_start(int, void *, unsigned int);
|
---|
214 |
|
---|
215 | #define async_obsolete_data_write_start(p, buf, len) \
|
---|
216 | async_obsolete_data_write_start_generic((p), (buf), (len), IPC_XF_NONE)
|
---|
217 |
|
---|
218 | #define async_obsolete_data_read_start(p, buf, len) \
|
---|
219 | async_obsolete_data_read_start_generic((p), (buf), (len), IPC_XF_NONE)
|
---|
220 |
|
---|
221 | #define async_obsolete_data_write_forward_0_0(phoneid, method, answer) \
|
---|
222 | async_obsolete_data_write_forward_fast((phoneid), (method), 0, 0, 0, 0, NULL)
|
---|
223 | #define async_obsolete_data_write_forward_0_1(phoneid, method, answer) \
|
---|
224 | async_obsolete_data_write_forward_fast((phoneid), (method), 0, 0, 0, 0, (answer))
|
---|
225 | #define async_obsolete_data_write_forward_1_0(phoneid, method, arg1, answer) \
|
---|
226 | async_obsolete_data_write_forward_fast((phoneid), (method), (arg1), 0, 0, 0, NULL)
|
---|
227 | #define async_obsolete_data_write_forward_1_1(phoneid, method, arg1, answer) \
|
---|
228 | async_obsolete_data_write_forward_fast((phoneid), (method), (arg1), 0, 0, 0, \
|
---|
229 | (answer))
|
---|
230 | #define async_obsolete_data_write_forward_2_0(phoneid, method, arg1, arg2, answer) \
|
---|
231 | async_obsolete_data_write_forward_fast((phoneid), (method), (arg1), (arg2), 0, 0, \
|
---|
232 | NULL)
|
---|
233 | #define async_obsolete_data_write_forward_2_1(phoneid, method, arg1, arg2, answer) \
|
---|
234 | async_obsolete_data_write_forward_fast((phoneid), (method), (arg1), (arg2), 0, 0, \
|
---|
235 | (answer))
|
---|
236 | #define async_obsolete_data_write_forward_3_0(phoneid, method, arg1, arg2, arg3, answer) \
|
---|
237 | async_obsolete_data_write_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
|
---|
238 | 0, NULL)
|
---|
239 | #define async_obsolete_data_write_forward_3_1(phoneid, method, arg1, arg2, arg3, answer) \
|
---|
240 | async_obsolete_data_write_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
|
---|
241 | 0, (answer))
|
---|
242 | #define async_obsolete_data_write_forward_4_0(phoneid, method, arg1, arg2, arg3, arg4, answer) \
|
---|
243 | async_obsolete_data_write_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
|
---|
244 | (arg4), NULL)
|
---|
245 | #define async_obsolete_data_write_forward_4_1(phoneid, method, arg1, arg2, arg3, arg4, answer) \
|
---|
246 | async_obsolete_data_write_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
|
---|
247 | (arg4), (answer))
|
---|
248 |
|
---|
249 | extern aid_t async_obsolete_data_read(int, void *, size_t, ipc_call_t *);
|
---|
250 | extern int async_obsolete_data_read_start_generic(int, void *, size_t, int);
|
---|
251 |
|
---|
252 | extern int async_obsolete_data_write_start_generic(int, const void *, size_t, int);
|
---|
253 | extern void async_obsolete_data_write_void(const int);
|
---|
254 |
|
---|
255 | extern int async_obsolete_forward_fast(ipc_callid_t, int, sysarg_t, sysarg_t,
|
---|
256 | sysarg_t, unsigned int);
|
---|
257 |
|
---|
258 | extern int async_obsolete_data_write_forward_fast(int, sysarg_t, sysarg_t, sysarg_t,
|
---|
259 | sysarg_t, sysarg_t, ipc_call_t *);
|
---|
260 |
|
---|
261 | #endif
|
---|
262 |
|
---|
263 | /** @}
|
---|
264 | */
|
---|