Changeset ca3ba3a in mainline
- Timestamp:
- 2009-06-03T19:21:04Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2595dab
- Parents:
- 76d0d284
- Location:
- uspace/lib/libc/include/ipc
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/include/ipc/console.h
r76d0d284 rca3ba3a 28 28 29 29 /** @addtogroup libcipc 30 * @{ 30 * @{ 31 31 */ 32 32 /** @file … … 37 37 38 38 #include <ipc/ipc.h> 39 #include <ipc/vfs.h> 39 40 40 41 typedef enum { 41 CONSOLE_GET KEY = IPC_FIRST_USER_METHOD,42 CONSOLE_ PUTCHAR,43 CONSOLE_ WRITE,42 CONSOLE_GET_SIZE = VFS_LAST_SRV, 43 CONSOLE_GET_EVENT, 44 CONSOLE_GOTO, 44 45 CONSOLE_CLEAR, 45 CONSOLE_GOTO,46 CONSOLE_GETSIZE,47 CONSOLE_FLUSH,48 46 CONSOLE_SET_STYLE, 49 47 CONSOLE_SET_COLOR, … … 54 52 55 53 #endif 56 54 57 55 /** @} 58 56 */ -
uspace/lib/libc/include/ipc/ipc.h
r76d0d284 rca3ba3a 31 31 */ 32 32 /** @file 33 */ 33 */ 34 34 35 35 #ifndef LIBIPC_IPC_H_ 36 36 #define LIBIPC_IPC_H_ 37 37 38 #include <task.h> 38 39 #include <kernel/ipc/ipc.h> 39 40 #include <kernel/ddi/irq.h> … … 41 42 #include <kernel/synch/synch.h> 42 43 44 #define IPC_FLAG_BLOCKING 0x01 45 43 46 typedef sysarg_t ipcarg_t; 47 44 48 typedef struct { 45 49 ipcarg_t args[IPC_CALL_LEN]; 46 50 ipcarg_t in_phone_hash; 47 51 } ipc_call_t; 52 48 53 typedef sysarg_t ipc_callid_t; 49 54 … … 57 62 */ 58 63 #define ipc_call_sync_0_0(phoneid, method) \ 59 64 ipc_call_sync_fast((phoneid), (method), 0, 0, 0, 0, 0, 0, 0, 0) 60 65 #define ipc_call_sync_0_1(phoneid, method, res1) \ 61 66 ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), 0, 0, 0, 0) 62 67 #define ipc_call_sync_0_2(phoneid, method, res1, res2) \ 63 68 ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), 0, 0, 0) 64 69 #define ipc_call_sync_0_3(phoneid, method, res1, res2, res3) \ 65 66 70 ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \ 71 0, 0) 67 72 #define ipc_call_sync_0_4(phoneid, method, res1, res2, res3, res4) \ 68 69 73 ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \ 74 (res4), 0) 70 75 #define ipc_call_sync_0_5(phoneid, method, res1, res2, res3, res4, res5) \ 71 ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \ 72 (res4), (res5)) 76 ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \ 77 (res4), (res5)) 78 73 79 #define ipc_call_sync_1_0(phoneid, method, arg1) \ 74 80 ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, 0, 0, 0, 0, 0) 75 81 #define ipc_call_sync_1_1(phoneid, method, arg1, res1) \ 76 82 ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), 0, 0, 0, 0) 77 83 #define ipc_call_sync_1_2(phoneid, method, arg1, res1, res2) \ 78 79 0, 0)84 ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), 0, \ 85 0, 0) 80 86 #define ipc_call_sync_1_3(phoneid, method, arg1, res1, res2, res3) \ 81 82 (res3), 0, 0)87 ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \ 88 (res3), 0, 0) 83 89 #define ipc_call_sync_1_4(phoneid, method, arg1, res1, res2, res3, res4) \ 84 85 (res3), (res4), 0)90 ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \ 91 (res3), (res4), 0) 86 92 #define ipc_call_sync_1_5(phoneid, method, arg1, res1, res2, res3, res4, \ 87 93 res5) \ 88 94 ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \ 89 95 (res3), (res4), (res5)) 96 90 97 #define ipc_call_sync_2_0(phoneid, method, arg1, arg2) \ 91 92 0, 0)98 ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, 0, 0, 0, \ 99 0, 0) 93 100 #define ipc_call_sync_2_1(phoneid, method, arg1, arg2, res1) \ 94 95 0, 0)101 ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), 0, 0, \ 102 0, 0) 96 103 #define ipc_call_sync_2_2(phoneid, method, arg1, arg2, res1, res2) \ 97 98 (res2), 0, 0, 0)104 ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \ 105 (res2), 0, 0, 0) 99 106 #define ipc_call_sync_2_3(phoneid, method, arg1, arg2, res1, res2, res3) \ 100 101 (res2), (res3), 0, 0)107 ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \ 108 (res2), (res3), 0, 0) 102 109 #define ipc_call_sync_2_4(phoneid, method, arg1, arg2, res1, res2, res3, \ 103 110 res4) \ … … 108 115 ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \ 109 116 (res2), (res3), (res4), (res5)) 117 110 118 #define ipc_call_sync_3_0(phoneid, method, arg1, arg2, arg3) \ 111 112 0, 0)119 ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, 0, 0, \ 120 0, 0) 113 121 #define ipc_call_sync_3_1(phoneid, method, arg1, arg2, arg3, res1) \ 114 115 0, 0, 0, 0)122 ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), (res1), \ 123 0, 0, 0, 0) 116 124 #define ipc_call_sync_3_2(phoneid, method, arg1, arg2, arg3, res1, res2) \ 117 118 (res2), 0, 0, 0)125 ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), (res1), \ 126 (res2), 0, 0, 0) 119 127 #define ipc_call_sync_3_3(phoneid, method, arg1, arg2, arg3, res1, res2, \ 120 128 res3) \ … … 129 137 ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), \ 130 138 (res1), (res2), (res3), (res4), (res5)) 139 131 140 #define ipc_call_sync_4_0(phoneid, method, arg1, arg2, arg3, arg4) \ 132 133 0, 0, 0, 0, 0)141 ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \ 142 0, 0, 0, 0, 0) 134 143 #define ipc_call_sync_4_1(phoneid, method, arg1, arg2, arg3, arg4, res1) \ 135 136 (res1), 0, 0, 0, 0)144 ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \ 145 (res1), 0, 0, 0, 0) 137 146 #define ipc_call_sync_4_2(phoneid, method, arg1, arg2, arg3, arg4, res1, res2) \ 138 139 (res1), (res2), 0, 0, 0)147 ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \ 148 (res1), (res2), 0, 0, 0) 140 149 #define ipc_call_sync_4_3(phoneid, method, arg1, arg2, arg3, arg4, res1, res2, \ 141 150 res3) \ … … 150 159 ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \ 151 160 (arg4), 0, (res1), (res2), (res3), (res4), (res5)) 161 152 162 #define ipc_call_sync_5_0(phoneid, method, arg1, arg2, arg3, arg4, arg5) \ 153 154 163 ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \ 164 (arg5), 0, 0, 0, 0, 0) 155 165 #define ipc_call_sync_5_1(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1) \ 156 157 166 ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \ 167 (arg5), (res1), 0, 0, 0, 0) 158 168 #define ipc_call_sync_5_2(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1, \ 159 169 res2) \ … … 182 192 extern ipc_callid_t ipc_wait_cycle(ipc_call_t *, uint32_t, int); 183 193 extern ipc_callid_t ipc_wait_for_call_timeout(ipc_call_t *, uint32_t); 194 184 195 static inline ipc_callid_t ipc_wait_for_call(ipc_call_t *data) 185 196 { 186 197 return ipc_wait_for_call_timeout(data, SYNCH_NO_TIMEOUT); 187 198 } 199 188 200 extern ipc_callid_t ipc_trywait_for_call(ipc_call_t *); 189 201 … … 195 207 */ 196 208 #define ipc_answer_0(callid, retval) \ 197 209 ipc_answer_fast((callid), (retval), 0, 0, 0, 0) 198 210 #define ipc_answer_1(callid, retval, arg1) \ 199 211 ipc_answer_fast((callid), (retval), (arg1), 0, 0, 0) 200 212 #define ipc_answer_2(callid, retval, arg1, arg2) \ 201 213 ipc_answer_fast((callid), (retval), (arg1), (arg2), 0, 0) 202 214 #define ipc_answer_3(callid, retval, arg1, arg2, arg3) \ 203 215 ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), 0) 204 216 #define ipc_answer_4(callid, retval, arg1, arg2, arg3, arg4) \ 205 217 ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), (arg4)) 206 218 #define ipc_answer_5(callid, retval, arg1, arg2, arg3, arg4, arg5) \ 207 219 ipc_answer_slow((callid), (retval), (arg1), (arg2), (arg3), (arg4), (arg5)) 208 220 209 221 extern ipcarg_t ipc_answer_fast(ipc_callid_t, ipcarg_t, ipcarg_t, ipcarg_t, … … 247 259 ipcarg_t, ipcarg_t, void *, ipc_async_callback_t, int); 248 260 249 #define IPC_FLAG_BLOCKING 0x01250 251 261 extern int ipc_connect_to_me(int, int, int, int, ipcarg_t *); 252 262 extern int ipc_connect_me_to(int, int, int, int); … … 257 267 extern int ipc_forward_fast(ipc_callid_t, int, int, ipcarg_t, ipcarg_t, int); 258 268 extern int ipc_forward_slow(ipc_callid_t, int, int, ipcarg_t, ipcarg_t, 259 ipcarg_t, ipcarg_t, ipcarg_t, int); 260 269 ipcarg_t, ipcarg_t, ipcarg_t, int); 261 270 262 271 /* … … 264 273 */ 265 274 #define ipc_share_in_start_0_0(phoneid, dst, size) \ 266 275 ipc_share_in_start((phoneid), (dst), (size), 0, NULL) 267 276 #define ipc_share_in_start_0_1(phoneid, dst, size, flags) \ 268 277 ipc_share_in_start((phoneid), (dst), (size), 0, (flags)) 269 278 #define ipc_share_in_start_1_0(phoneid, dst, size, arg) \ 270 279 ipc_share_in_start((phoneid), (dst), (size), (arg), NULL) 271 280 #define ipc_share_in_start_1_1(phoneid, dst, size, arg, flags) \ 272 281 ipc_share_in_start((phoneid), (dst), (size), (arg), (flags)) 273 282 274 283 extern int ipc_share_in_start(int, void *, size_t, ipcarg_t, int *); … … 285 294 extern int ipc_data_write_finalize(ipc_callid_t, void *, size_t); 286 295 287 #include <task.h>288 289 296 extern int ipc_connect_kbox(task_id_t); 290 297 -
uspace/lib/libc/include/ipc/loader.h
r76d0d284 rca3ba3a 43 43 LOADER_SET_PATHNAME, 44 44 LOADER_SET_ARGS, 45 LOADER_SET_FILES, 45 46 LOADER_LOAD, 46 47 LOADER_RUN -
uspace/lib/libc/include/ipc/ns.h
r76d0d284 rca3ba3a 36 36 #define LIBIPC_NS_H_ 37 37 38 #include <ipc/ipc.h> 39 40 typedef enum { 41 NS_PING = IPC_FIRST_USER_METHOD, 42 NS_TASK_WAIT 43 } ns_request_t; 44 38 45 #endif 39 46
Note:
See TracChangeset
for help on using the changeset viewer.