Changeset 5d3ed34 in mainline for kernel/generic/src/ipc/ipc.c
- Timestamp:
- 2012-09-03T21:39:37Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9c9bbaf
- Parents:
- 9ef1b79b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/ipc.c
r9ef1b79b r5d3ed34 46 46 #include <ipc/event.h> 47 47 #include <ipc/sysipc_ops.h> 48 #include <ipc/sysipc_priv.h> 48 49 #include <errno.h> 49 50 #include <mm/slab.h> … … 475 476 /** Answer all calls from list with EHANGUP answer. 476 477 * 478 * @param box Answerbox with the list. 477 479 * @param lst Head of the list to be cleaned up. 478 * 479 */ 480 void ipc_cleanup_call_list(list_t *lst) 481 { 480 */ 481 void ipc_cleanup_call_list(answerbox_t *box, list_t *lst) 482 { 483 irq_spinlock_lock(&box->lock, true); 482 484 while (!list_empty(lst)) { 483 485 call_t *call = list_get_instance(list_first(lst), call_t, … … 485 487 486 488 list_remove(&call->ab_link); 487 489 490 irq_spinlock_unlock(&box->lock, true); 491 492 ipc_data_t old = call->data; 488 493 IPC_SET_RETVAL(call->data, EHANGUP); 494 answer_preprocess(call, &old); 489 495 _ipc_answer_free_call(call, true); 490 } 496 497 irq_spinlock_lock(&box->lock, true); 498 } 499 irq_spinlock_unlock(&box->lock, true); 491 500 } 492 501 … … 694 703 695 704 /* Answer all messages in 'calls' and 'dispatched_calls' queues */ 696 irq_spinlock_lock(&TASK->answerbox.lock, true); 697 ipc_cleanup_call_list(&TASK->answerbox.dispatched_calls); 698 ipc_cleanup_call_list(&TASK->answerbox.calls); 699 irq_spinlock_unlock(&TASK->answerbox.lock, true); 705 ipc_cleanup_call_list(&TASK->answerbox, 706 &TASK->answerbox.dispatched_calls); 707 ipc_cleanup_call_list(&TASK->answerbox, &TASK->answerbox.calls); 700 708 701 709 ipc_forget_all_active_calls();
Note:
See TracChangeset
for help on using the changeset viewer.