Changes in kernel/generic/src/ipc/ipc.c [c713aa56:e701eb1] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/ipc.c
rc713aa56 re701eb1 212 212 * 213 213 * @param call Call structure to be answered. 214 * @param selflocked If true, then TASK->answebox is locked. 215 */ 216 static void _ipc_answer_free_call(call_t *call, bool selflocked) 214 */ 215 static void _ipc_answer_free_call(call_t *call) 217 216 { 218 217 answerbox_t *callerbox = call->callerbox; 219 bool do_lock = ((!selflocked) || callerbox != (&TASK->answerbox));220 218 221 219 call->flags |= IPC_CALL_ANSWERED; … … 228 226 } 229 227 230 if (do_lock) 231 spinlock_lock(&callerbox->lock); 228 spinlock_lock(&callerbox->lock); 232 229 list_append(&call->link, &callerbox->answers); 233 if (do_lock) 234 spinlock_unlock(&callerbox->lock); 230 spinlock_unlock(&callerbox->lock); 235 231 waitq_wakeup(&callerbox->wq, WAKEUP_FIRST); 236 232 } … … 248 244 spinlock_unlock(&box->lock); 249 245 /* Send back answer */ 250 _ipc_answer_free_call(call , false);246 _ipc_answer_free_call(call); 251 247 } 252 248 … … 265 261 atomic_inc(&phone->active_calls); 266 262 IPC_SET_RETVAL(call->data, err); 267 _ipc_answer_free_call(call , false);263 _ipc_answer_free_call(call); 268 264 } 269 265 … … 304 300 if (call->flags & IPC_CALL_FORWARDED) { 305 301 IPC_SET_RETVAL(call->data, EFORWARD); 306 _ipc_answer_free_call(call , false);302 _ipc_answer_free_call(call); 307 303 } else { 308 304 if (phone->state == IPC_PHONE_HUNGUP) … … 459 455 460 456 IPC_SET_RETVAL(call->data, EHANGUP); 461 _ipc_answer_free_call(call , true);457 _ipc_answer_free_call(call); 462 458 } 463 459 }
Note:
See TracChangeset
for help on using the changeset viewer.