Changeset 4c61e60 in mainline for libipc/generic/ipc.c
- Timestamp:
- 2006-03-19T19:42:38Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 06b0d112
- Parents:
- 7048773
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libipc/generic/ipc.c
r7048773 r4c61e60 47 47 ipc_callid_t callid; 48 48 struct { 49 ipc_call_t data; 49 50 int phoneid; 50 ipc_data_t data;51 51 } msg; 52 52 }u; … … 59 59 ipcarg_t *result) 60 60 { 61 ipc_ data_t resdata;61 ipc_call_t resdata; 62 62 int callres; 63 63 … … 75 75 ipcarg_t *result1, ipcarg_t *result2, ipcarg_t *result3) 76 76 { 77 ipc_ data_t data;77 ipc_call_t data; 78 78 int callres; 79 79 … … 98 98 99 99 /** Syscall to send asynchronous message */ 100 static ipc_callid_t _ipc_call_async(int phoneid, ipc_ data_t *data)100 static ipc_callid_t _ipc_call_async(int phoneid, ipc_call_t *data) 101 101 { 102 102 return __SYSCALL2(SYS_IPC_CALL_ASYNC, phoneid, (sysarg_t)data); … … 153 153 { 154 154 __SYSCALL4(SYS_IPC_ANSWER_FAST, callid, retval, arg1, arg2); 155 }156 157 158 /** Call syscall function sys_ipc_wait_for_call */159 static inline ipc_callid_t _ipc_wait_for_call(ipc_call_t *call, int flags)160 {161 return __SYSCALL3(SYS_IPC_WAIT, (sysarg_t)&call->data,162 (sysarg_t)&call->taskid, flags);163 155 } 164 156 … … 194 186 * @param callid Callid (with first bit set) of the answered call 195 187 */ 196 static void handle_answer(ipc_callid_t callid, ipc_ data_t *data)188 static void handle_answer(ipc_callid_t callid, ipc_call_t *data) 197 189 { 198 190 link_t *item; … … 230 222 try_dispatch_queued_calls(); 231 223 232 callid = _ ipc_wait_for_call(call, flags);224 callid = __SYSCALL2(SYS_IPC_WAIT, (sysarg_t)call, flags); 233 225 /* Handle received answers */ 234 226 if (callid & IPC_CALLID_ANSWERED) 235 handle_answer(callid, &call->data);227 handle_answer(callid, call); 236 228 } while (callid & IPC_CALLID_ANSWERED); 237 229 … … 239 231 } 240 232 241 /** Ask destination to do a callback connection */ 242 int ipc_connect_to_me(int phoneid, int arg1, int arg2, 243 unsigned long long *taskid) 244 { 245 return __SYSCALL4(SYS_IPC_CONNECT_TO_ME, phoneid, arg1, arg2, 246 (sysarg_t) taskid); 247 } 248 249 /** Ask through phone for a new connection to some service */ 233 /** Ask destination to do a callback connection 234 * 235 * @return 0 - OK, error code 236 */ 237 int ipc_connect_to_me(int phoneid, int arg1, int arg2, ipcarg_t *phone) 238 { 239 return ipc_call_sync_3(phoneid, IPC_M_CONNECT_TO_ME, arg1, 240 arg2, 0, 0, 0, phone); 241 } 242 243 /** Ask through phone for a new connection to some service 244 * 245 * @return new phoneid - OK, error code 246 */ 250 247 int ipc_connect_me_to(int phoneid, int arg1, int arg2) 251 248 { 252 return __SYSCALL3(SYS_IPC_CONNECT_ME_TO, phoneid, arg1, arg2); 249 int newphid; 250 int res; 251 252 res = ipc_call_sync_3(phoneid, IPC_M_CONNECT_ME_TO, arg1, 253 arg2, 0, 0, 0, &newphid); 254 if (res) 255 return res; 256 return newphid; 253 257 } 254 258
Note:
See TracChangeset
for help on using the changeset viewer.