Changeset 46577995 in mainline for kernel/generic/src/ipc/ops
- Timestamp:
- 2018-01-04T20:50:52Z (8 years ago)
- Children:
- e211ea04
- Parents:
- facacc71
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:47:53)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:50:52)
- Location:
- kernel/generic/src/ipc/ops
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/ops/conctmeto.c
rfacacc71 r46577995 40 40 #include <arch.h> 41 41 42 static int request_preprocess(call_t *call, phone_t *phone)42 static errno_t request_preprocess(call_t *call, phone_t *phone) 43 43 { 44 44 cap_handle_t phone_handle; 45 int rc = phone_alloc(TASK, &phone_handle);45 errno_t rc = phone_alloc(TASK, &phone_handle); 46 46 47 47 /* Remember the phone capability or that an error occured. */ … … 61 61 } 62 62 63 static int request_forget(call_t *call)63 static errno_t request_forget(call_t *call) 64 64 { 65 65 cap_handle_t phone_handle = (cap_handle_t) call->priv; … … 77 77 } 78 78 79 static int answer_preprocess(call_t *answer, ipc_data_t *olddata)79 static errno_t answer_preprocess(call_t *answer, ipc_data_t *olddata) 80 80 { 81 81 /* Hand over reference from ARG5 to phone */ … … 93 93 } 94 94 95 static int answer_process(call_t *answer)95 static errno_t answer_process(call_t *answer) 96 96 { 97 97 cap_handle_t phone_handle = (cap_handle_t) answer->priv; -
kernel/generic/src/ipc/ops/concttome.c
rfacacc71 r46577995 43 43 { 44 44 cap_handle_t phone_handle; 45 int rc = phone_alloc(TASK, &phone_handle);45 errno_t rc = phone_alloc(TASK, &phone_handle); 46 46 IPC_SET_ARG5(call->data, (rc == EOK) ? phone_handle : -1); 47 47 return 0; 48 48 } 49 49 50 static int answer_cleanup(call_t *answer, ipc_data_t *olddata)50 static errno_t answer_cleanup(call_t *answer, ipc_data_t *olddata) 51 51 { 52 52 cap_handle_t phone_handle = (cap_handle_t) IPC_GET_ARG5(*olddata); … … 58 58 } 59 59 60 static int answer_preprocess(call_t *answer, ipc_data_t *olddata)60 static errno_t answer_preprocess(call_t *answer, ipc_data_t *olddata) 61 61 { 62 62 cap_handle_t phone_handle = (cap_handle_t) IPC_GET_ARG5(*olddata); -
kernel/generic/src/ipc/ops/dataread.c
rfacacc71 r46577995 41 41 #include <config.h> 42 42 43 static int request_preprocess(call_t *call, phone_t *phone)43 static errno_t request_preprocess(call_t *call, phone_t *phone) 44 44 { 45 45 size_t size = IPC_GET_ARG2(call->data); … … 57 57 } 58 58 59 static int answer_preprocess(call_t *answer, ipc_data_t *olddata)59 static errno_t answer_preprocess(call_t *answer, ipc_data_t *olddata) 60 60 { 61 61 assert(!answer->buffer); … … 76 76 77 77 answer->buffer = malloc(size, 0); 78 int rc = copy_from_uspace(answer->buffer,78 errno_t rc = copy_from_uspace(answer->buffer, 79 79 (void *) src, size); 80 80 if (rc) { … … 95 95 } 96 96 97 static int answer_process(call_t *answer)97 static errno_t answer_process(call_t *answer) 98 98 { 99 99 if (answer->buffer) { 100 100 uintptr_t dst = IPC_GET_ARG1(answer->data); 101 101 size_t size = IPC_GET_ARG2(answer->data); 102 int rc;102 errno_t rc; 103 103 104 104 rc = copy_to_uspace((void *) dst, answer->buffer, size); -
kernel/generic/src/ipc/ops/datawrite.c
rfacacc71 r46577995 41 41 #include <config.h> 42 42 43 static int request_preprocess(call_t *call, phone_t *phone)43 static errno_t request_preprocess(call_t *call, phone_t *phone) 44 44 { 45 45 uintptr_t src = IPC_GET_ARG1(call->data); … … 57 57 58 58 call->buffer = (uint8_t *) malloc(size, 0); 59 int rc = copy_from_uspace(call->buffer, (void *) src, size);59 errno_t rc = copy_from_uspace(call->buffer, (void *) src, size); 60 60 if (rc != 0) { 61 61 /* … … 69 69 } 70 70 71 static int answer_preprocess(call_t *answer, ipc_data_t *olddata)71 static errno_t answer_preprocess(call_t *answer, ipc_data_t *olddata) 72 72 { 73 73 assert(answer->buffer); … … 80 80 81 81 if (size <= max_size) { 82 int rc = copy_to_uspace((void *) dst,82 errno_t rc = copy_to_uspace((void *) dst, 83 83 answer->buffer, size); 84 84 if (rc) -
kernel/generic/src/ipc/ops/debug.c
rfacacc71 r46577995 44 44 } 45 45 46 static int answer_process(call_t *answer)46 static errno_t answer_process(call_t *answer) 47 47 { 48 48 if (answer->buffer) { 49 49 uintptr_t dst = IPC_GET_ARG1(answer->data); 50 50 size_t size = IPC_GET_ARG2(answer->data); 51 int rc;51 errno_t rc; 52 52 53 53 rc = copy_to_uspace((void *) dst, answer->buffer, size); -
kernel/generic/src/ipc/ops/pagein.c
rfacacc71 r46577995 44 44 #include <arch.h> 45 45 46 static int pagein_request_preprocess(call_t *call, phone_t *phone)46 static errno_t pagein_request_preprocess(call_t *call, phone_t *phone) 47 47 { 48 48 /* … … 58 58 } 59 59 60 static int pagein_answer_preprocess(call_t *answer, ipc_data_t *olddata)60 static errno_t pagein_answer_preprocess(call_t *answer, ipc_data_t *olddata) 61 61 { 62 62 /* -
kernel/generic/src/ipc/ops/sharein.c
rfacacc71 r46577995 41 41 #include <arch.h> 42 42 43 static int answer_preprocess(call_t *answer, ipc_data_t *olddata)43 static errno_t answer_preprocess(call_t *answer, ipc_data_t *olddata) 44 44 { 45 45 if (!IPC_GET_RETVAL(answer->data)) { … … 49 49 50 50 uintptr_t dst_base = (uintptr_t) -1; 51 int rc = as_area_share(AS, IPC_GET_ARG1(answer->data),51 errno_t rc = as_area_share(AS, IPC_GET_ARG1(answer->data), 52 52 IPC_GET_ARG1(*olddata), as, IPC_GET_ARG2(answer->data), 53 53 &dst_base, IPC_GET_ARG3(answer->data)); -
kernel/generic/src/ipc/ops/shareout.c
rfacacc71 r46577995 42 42 #include <arch.h> 43 43 44 static int request_preprocess(call_t *call, phone_t *phone)44 static errno_t request_preprocess(call_t *call, phone_t *phone) 45 45 { 46 46 size_t size = as_area_get_size(IPC_GET_ARG1(call->data)); … … 53 53 } 54 54 55 static int answer_preprocess(call_t *answer, ipc_data_t *olddata)55 static errno_t answer_preprocess(call_t *answer, ipc_data_t *olddata) 56 56 { 57 int rc = EOK;57 errno_t rc = EOK; 58 58 59 59 if (!IPC_GET_RETVAL(answer->data)) { -
kernel/generic/src/ipc/ops/stchngath.c
rfacacc71 r46577995 41 41 #include <macros.h> 42 42 43 static int request_preprocess(call_t *call, phone_t *phone)43 static errno_t request_preprocess(call_t *call, phone_t *phone) 44 44 { 45 45 task_t *other_task_s; … … 68 68 } 69 69 70 static int answer_preprocess(call_t *answer, ipc_data_t *olddata)70 static errno_t answer_preprocess(call_t *answer, ipc_data_t *olddata) 71 71 { 72 int rc = EOK;72 errno_t rc = EOK; 73 73 74 74 if (!IPC_GET_RETVAL(answer->data)) {
Note:
See TracChangeset
for help on using the changeset viewer.