Changeset 455241b in mainline for kernel/generic/src/ipc/ops
- Timestamp:
- 2025-01-16T19:29:20Z (12 months ago)
- Children:
- ff4d31c
- Parents:
- df721df
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2025-01-16 19:23:14)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2025-01-16 19:29:20)
- Location:
- kernel/generic/src/ipc/ops
- Files:
-
- 3 edited
-
conctmeto.c (modified) (2 diffs)
-
concttome.c (modified) (2 diffs)
-
stchngath.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/ops/conctmeto.c
rdf721df r455241b 88 88 89 89 /* Set the recipient-assigned label */ 90 p obj->phone->label = ipc_get_arg5(&answer->data);90 phone_from_kobject(pobj)->label = ipc_get_arg5(&answer->data); 91 91 92 92 /* Restore phone handle in answer's ARG5 */ … … 96 96 if (ipc_get_retval(&answer->data) == EOK) { 97 97 /* Hand over reference from pobj to the answerbox */ 98 (void) ipc_phone_connect(p obj->phone, &TASK->answerbox);98 (void) ipc_phone_connect(phone_from_kobject(pobj), &TASK->answerbox); 99 99 } else { 100 100 /* Drop the extra reference */ -
kernel/generic/src/ipc/ops/concttome.c
rdf721df r455241b 49 49 * Set the sender-assigned label to the new phone. 50 50 */ 51 p obj->phone->label = ipc_get_arg5(&call->data);51 phone_from_kobject(pobj)->label = ipc_get_arg5(&call->data); 52 52 } 53 53 call->priv = (sysarg_t) pobj; … … 88 88 kobject_add_ref(pobj); 89 89 90 if (ipc_phone_connect(p obj->phone,90 if (ipc_phone_connect(phone_from_kobject(pobj), 91 91 &answer->sender->answerbox)) { 92 92 /* Pass the reference to the capability */ -
kernel/generic/src/ipc/ops/stchngath.c
rdf721df r455241b 45 45 task_t *other_task_s; 46 46 47 kobject_t *sender_obj =kobject_get(TASK,48 (cap_handle_t) ipc_get_arg5(&call->data), KOBJECT_TYPE_PHONE) ;49 if (!sender_ obj)47 phone_t *sender_phone = phone_from_kobject(kobject_get(TASK, 48 (cap_handle_t) ipc_get_arg5(&call->data), KOBJECT_TYPE_PHONE)); 49 if (!sender_phone) 50 50 return ENOENT; 51 51 52 mutex_lock(&sender_ obj->phone->lock);53 if (sender_ obj->phone->state != IPC_PHONE_CONNECTED) {54 mutex_unlock(&sender_ obj->phone->lock);55 kobject_put( sender_obj);52 mutex_lock(&sender_phone->lock); 53 if (sender_phone->state != IPC_PHONE_CONNECTED) { 54 mutex_unlock(&sender_phone->lock); 55 kobject_put(&sender_phone->kobject); 56 56 return EINVAL; 57 57 } 58 58 59 other_task_s = sender_ obj->phone->callee->task;59 other_task_s = sender_phone->callee->task; 60 60 61 mutex_unlock(&sender_ obj->phone->lock);61 mutex_unlock(&sender_phone->lock); 62 62 63 63 /* Remember the third party task hash. */ 64 64 ipc_set_arg5(&call->data, (sysarg_t) other_task_s); 65 65 66 kobject_put( sender_obj);66 kobject_put(&sender_phone->kobject); 67 67 return EOK; 68 68 } … … 77 77 task_t *other_task_r; 78 78 79 kobject_t *recipient_obj =kobject_get(TASK,79 phone_t *recipient_phone = phone_from_kobject(kobject_get(TASK, 80 80 (cap_handle_t) ipc_get_arg1(&answer->data), 81 KOBJECT_TYPE_PHONE) ;82 if (!recipient_ obj) {81 KOBJECT_TYPE_PHONE)); 82 if (!recipient_phone) { 83 83 ipc_set_retval(&answer->data, ENOENT); 84 84 return ENOENT; 85 85 } 86 86 87 mutex_lock(&recipient_ obj->phone->lock);88 if (recipient_ obj->phone->state != IPC_PHONE_CONNECTED) {89 mutex_unlock(&recipient_ obj->phone->lock);87 mutex_lock(&recipient_phone->lock); 88 if (recipient_phone->state != IPC_PHONE_CONNECTED) { 89 mutex_unlock(&recipient_phone->lock); 90 90 ipc_set_retval(&answer->data, EINVAL); 91 kobject_put( recipient_obj);91 kobject_put(&recipient_phone->kobject); 92 92 return EINVAL; 93 93 } 94 94 95 other_task_r = recipient_ obj->phone->callee->task;95 other_task_r = recipient_phone->callee->task; 96 96 other_task_s = (task_t *) ipc_get_arg5(olddata); 97 97 … … 114 114 } 115 115 116 mutex_unlock(&recipient_ obj->phone->lock);117 kobject_put( recipient_obj);116 mutex_unlock(&recipient_phone->lock); 117 kobject_put(&recipient_phone->kobject); 118 118 } 119 119
Note:
See TracChangeset
for help on using the changeset viewer.
