Changeset 5a77550 in mainline
- Timestamp:
- 2012-08-28T23:13:18Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9c9903a
- Parents:
- f39d5c2
- Location:
- kernel/generic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/ipc/ipc.h
rf39d5c2 r5a77550 141 141 struct task *sender; 142 142 143 /** Phone which was used to send the call. */ 144 phone_t *caller_phone; 145 143 146 /** Private data to internal IPC. */ 144 147 sysarg_t priv; … … 152 155 /** Buffer for IPC_M_DATA_WRITE and IPC_M_DATA_READ. */ 153 156 uint8_t *buffer; 154 155 /*156 * The forward operation can masquerade the caller phone. For those157 * cases, we must keep it aside so that the answer is processed158 * correctly.159 */160 phone_t *caller_phone;161 157 } call_t; 162 158 -
kernel/generic/src/ipc/ipc.c
rf39d5c2 r5a77550 165 165 } 166 166 167 /** Demasquerade the caller phone. */168 static void ipc_caller_phone_demasquerade(call_t *call)169 {170 if (call->flags & IPC_CALL_FORWARDED) {171 if (call->caller_phone) {172 call->data.phone = call->caller_phone;173 }174 }175 }176 177 167 /** Answer a message which was not dispatched and is not listed in any queue. 178 168 * … … 213 203 call->flags |= IPC_CALL_ANSWERED; 214 204 215 ipc_caller_phone_demasquerade(call);216 217 205 call->data.task_id = TASK->taskid; 218 206 … … 257 245 void ipc_backsend_err(phone_t *phone, call_t *call, sysarg_t err) 258 246 { 247 call->caller_phone = phone; 259 248 call->data.phone = phone; 260 249 atomic_inc(&phone->active_calls); … … 285 274 atomic_inc(&phone->active_calls); 286 275 276 call->caller_phone = phone; 287 277 call->active = true; 288 278 … … 401 391 402 392 if (mode & IPC_FF_ROUTE_FROM_ME) { 403 if (!call->caller_phone)404 call->caller_phone = call->data.phone;405 393 call->data.phone = newphone; 406 394 call->data.task_id = TASK->taskid; … … 459 447 call_t, ab_link); 460 448 list_remove(&request->ab_link); 461 atomic_dec(&request-> data.phone->active_calls);449 atomic_dec(&request->caller_phone->active_calls); 462 450 } else if (!list_empty(&box->calls)) { 463 451 /* Count received call */ … … 605 593 list_remove(&call->ta_link); 606 594 607 ipc_caller_phone_demasquerade(call);608 atomic_dec(&call->data.phone->active_calls);609 610 595 spinlock_unlock(&call->forget_lock); 611 596 spinlock_unlock(&TASK->active_calls_lock); 597 598 atomic_dec(&call->caller_phone->active_calls); 612 599 613 600 sysipc_ops_t *ops = sysipc_ops_get(call->request_method);
Note:
See TracChangeset
for help on using the changeset viewer.