Changeset 86c2ccd in mainline for uspace/drv/uhci-hcd/transfer_list.c
- Timestamp:
- 2011-02-26T01:25:28Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- eb292a0
- Parents:
- c3ae877
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/transfer_list.c
rc3ae877 r86c2ccd 70 70 assert(instance); 71 71 assert(batch); 72 usb_log_debug("Adding batch(%p) to queue %s.\n", batch, instance->name); 72 73 73 74 uint32_t pa = (uintptr_t)addr_to_phys(batch->qh); … … 123 124 } 124 125 /*----------------------------------------------------------------------------*/ 125 void transfer_list_ check(transfer_list_t *instance)126 void transfer_list_remove_finished(transfer_list_t *instance) 126 127 { 127 128 assert(instance); 129 130 LIST_INITIALIZE(done); 131 128 132 fibril_mutex_lock(&instance->guard); 129 133 link_t *current = instance->batch_list.next; … … 134 138 if (batch_is_complete(batch)) { 135 139 transfer_list_remove_batch(instance, batch); 136 batch->next_step(batch);140 list_append(current, &done); 137 141 } 138 142 current = next; 139 143 } 140 144 fibril_mutex_unlock(&instance->guard); 145 146 while (!list_empty(&done)) { 147 link_t *item = done.next; 148 list_remove(item); 149 batch_t *batch = list_get_instance(item, batch_t, link); 150 batch->next_step(batch); 151 } 141 152 } 142 153 /**
Note:
See TracChangeset
for help on using the changeset viewer.