Changeset e0df6c2 in mainline for uspace/drv/uhci-hcd/transfer_list.c
- Timestamp:
- 2011-02-12T03:04:40Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 67b6fc5
- Parents:
- d6115e5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/transfer_list.c
rd6115e5 re0df6c2 52 52 queue_head_init(instance->queue_head); 53 53 list_initialize(&instance->batch_list); 54 fibril_mutex_initialize(&instance->guard); 54 55 return EOK; 55 56 } … … 76 77 batch->qh->next_queue = instance->queue_head->next_queue; 77 78 79 fibril_mutex_lock(&instance->guard); 80 78 81 if (instance->queue_head->element == instance->queue_head->next_queue) { 79 82 /* there is nothing scheduled */ … … 82 85 usb_log_debug2("Added batch(%p) to queue %s first.\n", 83 86 batch, instance->name); 87 fibril_mutex_unlock(&instance->guard); 84 88 return; 85 89 } … … 94 98 usb_log_debug2("Added batch(%p) to queue %s last, first is %p.\n", 95 99 batch, instance->name, first ); 100 fibril_mutex_unlock(&instance->guard); 96 101 } 97 102 /*----------------------------------------------------------------------------*/ … … 105 110 106 111 /* I'm the first one here */ 107 if (batch->link. next== &instance->batch_list) {112 if (batch->link.prev == &instance->batch_list) { 108 113 usb_log_debug("Removing tracer %p was first, next element %x.\n", 109 114 batch, batch->qh->next_queue); … … 121 126 { 122 127 assert(instance); 128 fibril_mutex_lock(&instance->guard); 123 129 link_t *current = instance->batch_list.next; 124 130 while (current != &instance->batch_list) { … … 132 138 current = next; 133 139 } 140 fibril_mutex_unlock(&instance->guard); 134 141 } 135 142 /**
Note:
See TracChangeset
for help on using the changeset viewer.