Changeset 286e03d in mainline for generic/src/syscall/syscall.c
- Timestamp:
- 2006-03-15T11:44:26Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8965838e
- Parents:
- 91d5ad6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/syscall/syscall.c
r91d5ad6 r286e03d 98 98 99 99 /** Synchronous IPC call allowing to send whole message */ 100 static __native sys_ipc_call_sync(__native phoneid, __native *data) 100 static __native sys_ipc_call_sync(__native phoneid, __native *question, 101 __native *reply) 101 102 { 102 103 call_t call; … … 109 110 110 111 ipc_call_init(&call); 111 copy_from_uspace(&call.data, data, sizeof(call.data));112 copy_from_uspace(&call.data, question, sizeof(call.data)); 112 113 113 114 ipc_call_sync(phone, &call); 114 115 115 copy_to_uspace( data, &call.data, sizeof(call.data));116 copy_to_uspace(reply, &call.data, sizeof(call.data)); 116 117 117 118 return 0; … … 185 186 186 187 /** Send IPC answer */ 187 static __native sys_ipc_answer (__native callid, __native retval, __native arg1,188 188 static __native sys_ipc_answer_fast(__native callid, __native retval, 189 __native arg1, __native arg2) 189 190 { 190 191 call_t *call; … … 203 204 } 204 205 206 /** Send IPC answer */ 207 static __native sys_ipc_answer(__native callid, __native *data) 208 { 209 call_t *call; 210 211 /* Check that the user is not sending us answer callid */ 212 ASSERT(! (callid & 1)); 213 /* TODO: Check that the callid is in the dispatch table */ 214 call = (call_t *) callid; 215 copy_from_uspace(&call->data, data, sizeof(call->data)); 216 ipc_answer(&TASK->answerbox, call); 217 218 return 0; 219 } 220 205 221 /** Wait for incoming ipc call or answer 206 222 * … … 209 225 * @return Callid, if callid & 1, then the call is answer 210 226 */ 211 static __native sys_ipc_wait_for_call(__native *calldata, __native flags) 227 static __native sys_ipc_wait_for_call(__native *calldata, task_id_t *taskid, 228 __native flags) 212 229 { 213 230 call_t *call; … … 223 240 return ((__native)call) | IPC_CALLID_ANSWERED; 224 241 } 242 copy_to_uspace(taskid, (void *)&TASK->taskid, sizeof(TASK->taskid)); 225 243 return (__native)call; 226 244 } … … 239 257 sys_ipc_call_async_fast, 240 258 sys_ipc_call_async, 259 sys_ipc_answer_fast, 241 260 sys_ipc_answer, 242 261 sys_ipc_wait_for_call
Note:
See TracChangeset
for help on using the changeset viewer.