source: mainline/uspace/lib/c/include/async_obsolete.h@ a40dea3

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since a40dea3 was 9934f7d, checked in by Jiri Svoboda <jiri@…>, 14 years ago

Add extra argument to async connection handlers that can be used for passing
information from async_connect_to_me() to the handler.

  • Property mode set to 100644
File size: 14.2 KB
RevLine 
[79ae36dd]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
42extern void async_obsolete_serialize_start(void);
43extern void async_obsolete_serialize_end(void);
44
45#define async_obsolete_send_0(phoneid, method, dataptr) \
46 async_obsolete_send_fast((phoneid), (method), 0, 0, 0, 0, (dataptr))
47#define async_obsolete_send_1(phoneid, method, arg1, dataptr) \
48 async_obsolete_send_fast((phoneid), (method), (arg1), 0, 0, 0, (dataptr))
49#define async_obsolete_send_2(phoneid, method, arg1, arg2, dataptr) \
50 async_obsolete_send_fast((phoneid), (method), (arg1), (arg2), 0, 0, (dataptr))
51#define async_obsolete_send_3(phoneid, method, arg1, arg2, arg3, dataptr) \
52 async_obsolete_send_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (dataptr))
53#define async_obsolete_send_4(phoneid, method, arg1, arg2, arg3, arg4, dataptr) \
54 async_obsolete_send_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
55 (dataptr))
56#define async_obsolete_send_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, dataptr) \
57 async_obsolete_send_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
58 (arg5), (dataptr))
59
60extern aid_t async_obsolete_send_fast(int phoneid, sysarg_t method, sysarg_t arg1,
61 sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, ipc_call_t *dataptr);
62extern aid_t async_obsolete_send_slow(int phoneid, sysarg_t method, sysarg_t arg1,
63 sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5,
64 ipc_call_t *dataptr);
65
66#define async_obsolete_req_0_0(phoneid, method) \
67 async_obsolete_req_fast((phoneid), (method), 0, 0, 0, 0, NULL, NULL, NULL, NULL, \
68 NULL)
69#define async_obsolete_req_0_1(phoneid, method, r1) \
70 async_obsolete_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), NULL, NULL, NULL, \
71 NULL)
72#define async_obsolete_req_0_2(phoneid, method, r1, r2) \
73 async_obsolete_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), NULL, NULL, \
74 NULL)
75#define async_obsolete_req_0_3(phoneid, method, r1, r2, r3) \
76 async_obsolete_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), (r3), NULL, \
77 NULL)
78#define async_obsolete_req_0_4(phoneid, method, r1, r2, r3, r4) \
79 async_obsolete_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), (r3), (r4), \
80 NULL)
81#define async_obsolete_req_0_5(phoneid, method, r1, r2, r3, r4, r5) \
82 async_obsolete_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), (r3), (r4), \
83 (r5))
84#define async_obsolete_req_1_0(phoneid, method, arg1) \
85 async_obsolete_req_fast((phoneid), (method), (arg1), 0, 0, 0, NULL, NULL, NULL, \
86 NULL, NULL)
87#define async_obsolete_req_1_1(phoneid, method, arg1, rc1) \
88 async_obsolete_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), NULL, NULL, \
89 NULL, NULL)
90#define async_obsolete_req_1_2(phoneid, method, arg1, rc1, rc2) \
91 async_obsolete_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), NULL, \
92 NULL, NULL)
93#define async_obsolete_req_1_3(phoneid, method, arg1, rc1, rc2, rc3) \
94 async_obsolete_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), (rc3), \
95 NULL, NULL)
96#define async_obsolete_req_1_4(phoneid, method, arg1, rc1, rc2, rc3, rc4) \
97 async_obsolete_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), (rc3), \
98 (rc4), NULL)
99#define async_obsolete_req_1_5(phoneid, method, arg1, rc1, rc2, rc3, rc4, rc5) \
100 async_obsolete_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), (rc3), \
101 (rc4), (rc5))
102#define async_obsolete_req_2_0(phoneid, method, arg1, arg2) \
103 async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, NULL, NULL, \
104 NULL, NULL, NULL)
105#define async_obsolete_req_2_1(phoneid, method, arg1, arg2, rc1) \
106 async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), NULL, \
107 NULL, NULL, NULL)
108#define async_obsolete_req_2_2(phoneid, method, arg1, arg2, rc1, rc2) \
109 async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \
110 NULL, NULL, NULL)
111#define async_obsolete_req_2_3(phoneid, method, arg1, arg2, rc1, rc2, rc3) \
112 async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \
113 (rc3), NULL, NULL)
114#define async_obsolete_req_2_4(phoneid, method, arg1, arg2, rc1, rc2, rc3, rc4) \
115 async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \
116 (rc3), (rc4), NULL)
117#define async_obsolete_req_2_5(phoneid, method, arg1, arg2, rc1, rc2, rc3, rc4, rc5) \
118 async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \
119 (rc3), (rc4), (rc5))
120#define async_obsolete_req_3_0(phoneid, method, arg1, arg2, arg3) \
121 async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, NULL, NULL, \
122 NULL, NULL, NULL)
123#define async_obsolete_req_3_1(phoneid, method, arg1, arg2, arg3, rc1) \
124 async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \
125 NULL, NULL, NULL, NULL)
126#define async_obsolete_req_3_2(phoneid, method, arg1, arg2, arg3, rc1, rc2) \
127 async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \
128 (rc2), NULL, NULL, NULL)
129#define async_obsolete_req_3_3(phoneid, method, arg1, arg2, arg3, rc1, rc2, rc3) \
130 async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \
131 (rc2), (rc3), NULL, NULL)
132#define async_obsolete_req_3_4(phoneid, method, arg1, arg2, arg3, rc1, rc2, rc3, rc4) \
133 async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \
134 (rc2), (rc3), (rc4), NULL)
135#define async_obsolete_req_3_5(phoneid, method, arg1, arg2, arg3, rc1, rc2, rc3, rc4, \
136 rc5) \
137 async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \
138 (rc2), (rc3), (rc4), (rc5))
139#define async_obsolete_req_4_0(phoneid, method, arg1, arg2, arg3, arg4) \
140 async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), NULL, \
141 NULL, NULL, NULL, NULL)
142#define async_obsolete_req_4_1(phoneid, method, arg1, arg2, arg3, arg4, rc1) \
143 async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), (rc1), \
144 NULL, NULL, NULL, NULL)
145#define async_obsolete_req_4_2(phoneid, method, arg1, arg2, arg3, arg4, rc1, rc2) \
146 async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), (rc1), \
147 (rc2), NULL, NULL, NULL)
148#define async_obsolete_req_4_3(phoneid, method, arg1, arg2, arg3, arg4, rc1, rc2, rc3) \
149 async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), (rc1), \
150 (rc2), (rc3), NULL, NULL)
151#define async_obsolete_req_4_4(phoneid, method, arg1, arg2, arg3, arg4, rc1, rc2, rc3, \
152 rc4) \
153 async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
154 (rc1), (rc2), (rc3), (rc4), NULL)
155#define async_obsolete_req_4_5(phoneid, method, arg1, arg2, arg3, arg4, rc1, rc2, rc3, \
156 rc4, rc5) \
157 async_obsolete_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
158 (rc1), (rc2), (rc3), (rc4), (rc5))
159#define async_obsolete_req_5_0(phoneid, method, arg1, arg2, arg3, arg4, arg5) \
160 async_obsolete_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
161 (arg5), NULL, NULL, NULL, NULL, NULL)
162#define async_obsolete_req_5_1(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1) \
163 async_obsolete_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
164 (arg5), (rc1), NULL, NULL, NULL, NULL)
165#define async_obsolete_req_5_2(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1, rc2) \
166 async_obsolete_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
167 (arg5), (rc1), (rc2), NULL, NULL, NULL)
168#define async_obsolete_req_5_3(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1, rc2, \
169 rc3) \
170 async_obsolete_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
171 (arg5), (rc1), (rc2), (rc3), NULL, NULL)
172#define async_obsolete_req_5_4(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1, rc2, \
173 rc3, rc4) \
174 async_obsolete_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
175 (arg5), (rc1), (rc2), (rc3), (rc4), NULL)
176#define async_obsolete_req_5_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1, rc2, \
177 rc3, rc4, rc5) \
178 async_obsolete_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
179 (arg5), (rc1), (rc2), (rc3), (rc4), (rc5))
180
181extern sysarg_t async_obsolete_req_fast(int phoneid, sysarg_t method, sysarg_t arg1,
182 sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t *r1, sysarg_t *r2,
183 sysarg_t *r3, sysarg_t *r4, sysarg_t *r5);
184extern sysarg_t async_obsolete_req_slow(int phoneid, sysarg_t method, sysarg_t arg1,
185 sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5, sysarg_t *r1,
186 sysarg_t *r2, sysarg_t *r3, sysarg_t *r4, sysarg_t *r5);
187
188extern void async_obsolete_msg_0(int, sysarg_t);
189extern void async_obsolete_msg_1(int, sysarg_t, sysarg_t);
190extern void async_obsolete_msg_2(int, sysarg_t, sysarg_t, sysarg_t);
191extern void async_obsolete_msg_3(int, sysarg_t, sysarg_t, sysarg_t, sysarg_t);
192extern void async_obsolete_msg_4(int, sysarg_t, sysarg_t, sysarg_t, sysarg_t, sysarg_t);
193extern void async_obsolete_msg_5(int, sysarg_t, sysarg_t, sysarg_t, sysarg_t, sysarg_t,
194 sysarg_t);
195
196extern int async_obsolete_forward_slow(ipc_callid_t, int, sysarg_t, sysarg_t, sysarg_t,
197 sysarg_t, sysarg_t, sysarg_t, unsigned int);
198
199extern int async_obsolete_connect_to_me(int, sysarg_t, sysarg_t, sysarg_t,
[9934f7d]200 async_client_conn_t, void *);
[79ae36dd]201extern int async_obsolete_connect_me_to(int, sysarg_t, sysarg_t, sysarg_t);
202extern int async_obsolete_connect_me_to_blocking(int, sysarg_t, sysarg_t, sysarg_t);
203extern int async_obsolete_hangup(int);
204
205#define async_obsolete_share_in_start_0_0(phoneid, dst, size) \
206 async_obsolete_share_in_start((phoneid), (dst), (size), 0, NULL)
207#define async_obsolete_share_in_start_0_1(phoneid, dst, size, flags) \
208 async_obsolete_share_in_start((phoneid), (dst), (size), 0, (flags))
209#define async_obsolete_share_in_start_1_0(phoneid, dst, size, arg) \
210 async_obsolete_share_in_start((phoneid), (dst), (size), (arg), NULL)
211#define async_obsolete_share_in_start_1_1(phoneid, dst, size, arg, flags) \
212 async_obsolete_share_in_start((phoneid), (dst), (size), (arg), (flags))
213
214extern int async_obsolete_share_in_start(int, void *, size_t, sysarg_t,
215 unsigned int *);
216extern int async_obsolete_share_out_start(int, void *, unsigned int);
217
218#define async_obsolete_data_write_start(p, buf, len) \
219 async_obsolete_data_write_start_generic((p), (buf), (len), IPC_XF_NONE)
220
221#define async_obsolete_data_read_start(p, buf, len) \
222 async_obsolete_data_read_start_generic((p), (buf), (len), IPC_XF_NONE)
223
224#define async_obsolete_data_write_forward_0_0(phoneid, method, answer) \
225 async_obsolete_data_write_forward_fast((phoneid), (method), 0, 0, 0, 0, NULL)
226#define async_obsolete_data_write_forward_0_1(phoneid, method, answer) \
227 async_obsolete_data_write_forward_fast((phoneid), (method), 0, 0, 0, 0, (answer))
228#define async_obsolete_data_write_forward_1_0(phoneid, method, arg1, answer) \
229 async_obsolete_data_write_forward_fast((phoneid), (method), (arg1), 0, 0, 0, NULL)
230#define async_obsolete_data_write_forward_1_1(phoneid, method, arg1, answer) \
231 async_obsolete_data_write_forward_fast((phoneid), (method), (arg1), 0, 0, 0, \
232 (answer))
233#define async_obsolete_data_write_forward_2_0(phoneid, method, arg1, arg2, answer) \
234 async_obsolete_data_write_forward_fast((phoneid), (method), (arg1), (arg2), 0, 0, \
235 NULL)
236#define async_obsolete_data_write_forward_2_1(phoneid, method, arg1, arg2, answer) \
237 async_obsolete_data_write_forward_fast((phoneid), (method), (arg1), (arg2), 0, 0, \
238 (answer))
239#define async_obsolete_data_write_forward_3_0(phoneid, method, arg1, arg2, arg3, answer) \
240 async_obsolete_data_write_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
241 0, NULL)
242#define async_obsolete_data_write_forward_3_1(phoneid, method, arg1, arg2, arg3, answer) \
243 async_obsolete_data_write_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
244 0, (answer))
245#define async_obsolete_data_write_forward_4_0(phoneid, method, arg1, arg2, arg3, arg4, answer) \
246 async_obsolete_data_write_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
247 (arg4), NULL)
248#define async_obsolete_data_write_forward_4_1(phoneid, method, arg1, arg2, arg3, arg4, answer) \
249 async_obsolete_data_write_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
250 (arg4), (answer))
251
252extern aid_t async_obsolete_data_read(int, void *, size_t, ipc_call_t *);
253extern int async_obsolete_data_read_start_generic(int, void *, size_t, int);
254
255extern int async_obsolete_data_write_start_generic(int, const void *, size_t, int);
256extern void async_obsolete_data_write_void(const int);
257
258extern int async_obsolete_forward_fast(ipc_callid_t, int, sysarg_t, sysarg_t,
259 sysarg_t, unsigned int);
260
261extern int async_obsolete_data_write_forward_fast(int, sysarg_t, sysarg_t, sysarg_t,
262 sysarg_t, sysarg_t, ipc_call_t *);
263
264#endif
265
266/** @}
267 */
Note: See TracBrowser for help on using the repository browser.