Changeset 79e1abd in mainline for uspace/drv/uhci-hcd/transfer_list.c
- Timestamp:
- 2011-03-29T12:09:15Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d012590
- Parents:
- 841e6e5 (diff), 51e5608 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/transfer_list.c
r841e6e5 r79e1abd 58 58 } 59 59 instance->queue_head_pa = addr_to_phys(instance->queue_head); 60 usb_log_debug2("Transfer list %s setup with QH: %p(%p).\n", 61 name, instance->queue_head, instance->queue_head_pa); 60 62 61 63 qh_init(instance->queue_head); … … 118 120 qh_set_next_qh(last_qh, pa); 119 121 122 asm volatile ("": : :"memory"); 123 120 124 /* Add to the driver list */ 121 125 list_append(&batch->link, &instance->batch_list); … … 137 141 * this transfer list leading to the deadlock if its done inline. 138 142 */ 139 void transfer_list_remove_finished(transfer_list_t *instance) 140 { 141 assert(instance); 142 143 LIST_INITIALIZE(done); 143 void transfer_list_remove_finished(transfer_list_t *instance, link_t *done) 144 { 145 assert(instance); 146 assert(done); 144 147 145 148 fibril_mutex_lock(&instance->guard); … … 153 156 /* Save for post-processing */ 154 157 transfer_list_remove_batch(instance, batch); 155 list_append(current, &done);158 list_append(current, done); 156 159 } 157 160 current = next; … … 159 162 fibril_mutex_unlock(&instance->guard); 160 163 161 while (!list_empty(&done)) {162 link_t *item = done.next;163 list_remove(item);164 usb_transfer_batch_t *batch =165 list_get_instance(item, usb_transfer_batch_t, link);166 batch->next_step(batch);167 }168 164 } 169 165 /*----------------------------------------------------------------------------*/ … … 222 218 qpos = "NOT FIRST"; 223 219 } 220 asm volatile ("": : :"memory"); 224 221 /* Remove from the batch list */ 225 222 list_remove(&batch->link);
Note:
See TracChangeset
for help on using the changeset viewer.