Changeset b72efe8 in mainline for uspace/drv/uhci/transfer_list.c
- Timestamp:
- 2011-06-19T14:38:59Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 74464e8
- Parents:
- 1d1bb0f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci/transfer_list.c
r1d1bb0f rb72efe8 121 121 } else { 122 122 /* There is something scheduled */ 123 usb_transfer_batch_t *last = 124 usb_transfer_batch_from_link(instance->batch_list.prev);123 usb_transfer_batch_t *last = usb_transfer_batch_from_link( 124 list_last(&instance->batch_list)); 125 125 last_qh = batch_qh(last); 126 126 } … … 146 146 } 147 147 /*----------------------------------------------------------------------------*/ 148 /** Add completed ba ntches to the provided list.148 /** Add completed batches to the provided list. 149 149 * 150 150 * @param[in] instance List to use. 151 151 * @param[in] done list to fill 152 152 */ 153 void transfer_list_remove_finished(transfer_list_t *instance, li nk_t *done)153 void transfer_list_remove_finished(transfer_list_t *instance, list_t *done) 154 154 { 155 155 assert(instance); … … 157 157 158 158 fibril_mutex_lock(&instance->guard); 159 link_t *current = instance->batch_list. next;160 while (current != &instance->batch_list ) {159 link_t *current = instance->batch_list.head.next; 160 while (current != &instance->batch_list.head) { 161 161 link_t * const next = current->next; 162 162 usb_transfer_batch_t *batch = … … 181 181 fibril_mutex_lock(&instance->guard); 182 182 while (!list_empty(&instance->batch_list)) { 183 link_t * const current = instance->batch_list.next;183 link_t * const current = list_first(&instance->batch_list); 184 184 usb_transfer_batch_t *batch = 185 185 usb_transfer_batch_from_link(current); … … 212 212 qh_t *prev_qh = NULL; 213 213 /* Remove from the hardware queue */ 214 if ( instance->batch_list.next== &batch->link) {214 if (list_first(&instance->batch_list) == &batch->link) { 215 215 /* I'm the first one here */ 216 216 prev_qh = instance->queue_head;
Note:
See TracChangeset
for help on using the changeset viewer.