Changeset 1585c7e in mainline for uspace/drv/uhci-hcd/transfer_list.c


Ignore:
Timestamp:
2011-03-25T17:03:49Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
da88eb82
Parents:
d93b3e3
Message:

Use control transfer lock for control transfers.

Use global done list for all transfer lists.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-hcd/transfer_list.c

    rd93b3e3 r1585c7e  
    142142 * this transfer list leading to the deadlock if its done inline.
    143143 */
    144 void transfer_list_remove_finished(transfer_list_t *instance)
    145 {
    146         assert(instance);
    147 
    148         LIST_INITIALIZE(done);
     144void transfer_list_remove_finished(transfer_list_t *instance, link_t *done)
     145{
     146        assert(instance);
     147        assert(done);
    149148
    150149        fibril_mutex_lock(&instance->guard);
     
    158157                        /* Save for post-processing */
    159158                        transfer_list_remove_batch(instance, batch);
    160                         list_append(current, &done);
     159                        list_append(current, done);
    161160                }
    162161                current = next;
     
    164163        fibril_mutex_unlock(&instance->guard);
    165164
    166         async_usleep(1000);
    167         while (!list_empty(&done)) {
    168                 link_t *item = done.next;
    169                 list_remove(item);
    170                 usb_transfer_batch_t *batch =
    171                     list_get_instance(item, usb_transfer_batch_t, link);
    172                 batch->next_step(batch);
    173         }
    174165}
    175166/*----------------------------------------------------------------------------*/
Note: See TracChangeset for help on using the changeset viewer.