Changeset eadaeae8 in mainline for kernel/generic/src/ipc/ops/concttome.c
- Timestamp:
- 2018-03-21T20:58:49Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3be9d10
- Parents:
- 874381a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/ops/concttome.c
r874381a readaeae8 42 42 static int request_process(call_t *call, answerbox_t *box) 43 43 { 44 cap_ handle_t phone_handle;44 cap_phone_handle_t phone_handle; 45 45 kobject_t *phone_obj; 46 46 errno_t rc = phone_alloc(TASK, false, &phone_handle, &phone_obj); 47 47 call->priv = (sysarg_t) phone_obj; 48 IPC_SET_ARG5(call->data, (rc == EOK) ? phone_handle : -1); 48 IPC_SET_ARG5(call->data, 49 (rc == EOK) ? CAP_HANDLE_RAW(phone_handle) : CAP_NIL); 49 50 return 0; 50 51 } … … 52 53 static errno_t answer_cleanup(call_t *answer, ipc_data_t *olddata) 53 54 { 54 cap_ handle_t phone_handle = (cap_handle_t) IPC_GET_ARG5(*olddata);55 cap_phone_handle_t phone_handle = (cap_handle_t) IPC_GET_ARG5(*olddata); 55 56 kobject_t *phone_obj = (kobject_t *) answer->priv; 56 57 57 if ( phone_handle >= 0) {58 if (CAP_HANDLE_VALID(phone_handle)) { 58 59 kobject_put(phone_obj); 59 60 cap_free(TASK, phone_handle); … … 65 66 static errno_t answer_preprocess(call_t *answer, ipc_data_t *olddata) 66 67 { 67 cap_ handle_t phone_handle = (cap_handle_t) IPC_GET_ARG5(*olddata);68 cap_phone_handle_t phone_handle = (cap_handle_t) IPC_GET_ARG5(*olddata); 68 69 kobject_t *phone_obj = (kobject_t *) answer->priv; 69 70 … … 71 72 /* The connection was not accepted */ 72 73 answer_cleanup(answer, olddata); 73 } else if ( phone_handle >= 0) {74 } else if (CAP_HANDLE_VALID(phone_handle)) { 74 75 /* 75 76 * The connection was accepted
Note:
See TracChangeset
for help on using the changeset viewer.