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