Changeset b131ef3 in mainline
- Timestamp:
- 2018-03-11T07:35:05Z (7 years ago)
- Children:
- 5ee4266
- Parents:
- 4428d62
- git-author:
- Jakub Jermar <jakub@…> (2018-03-04 11:18:52)
- git-committer:
- Jakub Jermar <jakub@…> (2018-03-11 07:35:05)
- Location:
- kernel/generic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/ipc/ipc.h
r4428d62 rb131ef3 82 82 waitq_t wq; 83 83 84 /** 85 * Number of answers the answerbox is expecting to eventually arrive. 86 */ 87 atomic_t active_calls; 88 84 89 /** Phones connected to this answerbox. */ 85 90 list_t connected_phones; -
kernel/generic/src/ipc/ipc.c
r4428d62 rb131ef3 147 147 list_initialize(&box->answers); 148 148 list_initialize(&box->irq_notifs); 149 atomic_set(&box->active_calls, 0); 149 150 box->task = task; 150 151 } … … 350 351 } else { 351 352 atomic_inc(&phone->active_calls); 353 atomic_inc(&caller->answerbox.active_calls); 352 354 kobject_add_ref(phone->kobject); 353 355 call->sender = caller; … … 564 566 list_remove(&request->ab_link); 565 567 atomic_dec(&request->caller_phone->active_calls); 568 atomic_dec(&box->active_calls); 566 569 kobject_put(request->caller_phone->kobject); 567 570 } else if (!list_empty(&box->calls)) { … … 709 712 710 713 atomic_dec(&call->caller_phone->active_calls); 714 atomic_dec(&TASK->answerbox.active_calls); 711 715 kobject_put(call->caller_phone->kobject); 712 716 … … 799 803 /* 800 804 * Go through all phones, until they are all free. 801 * Locking is needed as there may be connection handshakes in progress.802 805 */ 803 806 restart = false; 804 807 if (caps_apply_to_kobject_type(TASK, KOBJECT_TYPE_PHONE, 805 phone_cap_wait_cb, &restart)) { 808 phone_cap_wait_cb, &restart) && 809 atomic_get(&TASK->answerbox.active_calls) == 0) { 806 810 /* Got into cleanup */ 807 811 return;
Note:
See TracChangeset
for help on using the changeset viewer.