Changeset 13dbaa8c in mainline
- Timestamp:
- 2012-08-21T21:37:54Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b1e6269
- Parents:
- 1b186ed
- Location:
- kernel/generic/src/ipc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/ops/dataread.c
r1b186ed r13dbaa8c 91 91 } 92 92 93 static int answer_process(call_t *answer) 94 { 95 if (answer->buffer) { 96 uintptr_t dst = IPC_GET_ARG1(answer->data); 97 size_t size = IPC_GET_ARG2(answer->data); 98 int rc; 99 100 rc = copy_to_uspace((void *) dst, answer->buffer, size); 101 if (rc) 102 IPC_SET_RETVAL(answer->data, rc); 103 } 104 105 return EOK; 106 } 107 93 108 sysipc_ops_t ipc_m_data_read_ops = { 94 109 .request_preprocess = request_preprocess, 95 110 .request_process = null_request_process, 96 111 .answer_preprocess = answer_preprocess, 97 .answer_process = null_answer_process,112 .answer_process = answer_process, 98 113 }; 99 114 -
kernel/generic/src/ipc/ops/debug.c
r1b186ed r13dbaa8c 36 36 #include <ipc/ipc.h> 37 37 #include <udebug/udebug_ipc.h> 38 #include <syscall/copy.h> 39 #include <abi/errno.h> 38 40 39 41 static int request_process(call_t *call, answerbox_t *box) 40 42 { 41 43 return -1; 44 } 45 46 static int answer_process(call_t *answer) 47 { 48 if (answer->buffer) { 49 uintptr_t dst = IPC_GET_ARG1(answer->data); 50 size_t size = IPC_GET_ARG2(answer->data); 51 int rc; 52 53 rc = copy_to_uspace((void *) dst, answer->buffer, size); 54 if (rc) 55 IPC_SET_RETVAL(answer->data, rc); 56 } 57 58 return EOK; 42 59 } 43 60 … … 50 67 .request_process = request_process, 51 68 .answer_preprocess = null_answer_preprocess, 52 .answer_process = null_answer_process,69 .answer_process = answer_process, 53 70 }; 54 71 -
kernel/generic/src/ipc/sysipc.c
r1b186ed r13dbaa8c 243 243 IPC_SET_RETVAL(call->data, EFORWARD); 244 244 245 if (call->buffer) {246 /*247 * This must be an affirmative answer to IPC_M_DATA_READ248 * or IPC_M_DEBUG/UDEBUG_M_MEM_READ...249 *250 */251 uintptr_t dst = IPC_GET_ARG1(call->data);252 size_t size = IPC_GET_ARG2(call->data);253 int rc = copy_to_uspace((void *) dst, call->buffer, size);254 if (rc)255 IPC_SET_RETVAL(call->data, rc);256 free(call->buffer);257 call->buffer = NULL;258 }259 260 245 sysipc_ops_t *ops = sysipc_ops_get(call->request_method); 261 246 if (ops->answer_process)
Note:
See TracChangeset
for help on using the changeset viewer.