Ignore:
Timestamp:
2011-07-13T22:39:18Z (13 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e6910c8
Parents:
5974661 (diff), 8ecef91 (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.
Message:

Merge libposix.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/transfer_list.c

    r5974661 re4f8c77  
    121121        } else {
    122122                /* 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));
    125125                last_qh = batch_qh(last);
    126126        }
     
    141141        list_append(&batch->link, &instance->batch_list);
    142142
    143         usb_transfer_batch_t *first = list_get_instance(
    144             instance->batch_list.next, usb_transfer_batch_t, link);
    145         usb_log_debug("Batch(%p) added to queue %s, first is %p.\n",
    146                 batch, instance->name, first);
     143        usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT " scheduled in queue %s.\n",
     144            batch, USB_TRANSFER_BATCH_ARGS(*batch), instance->name);
    147145        fibril_mutex_unlock(&instance->guard);
    148146}
    149147/*----------------------------------------------------------------------------*/
    150 /** Add completed bantches to the provided list.
     148/** Add completed batches to the provided list.
    151149 *
    152150 * @param[in] instance List to use.
    153151 * @param[in] done list to fill
    154152 */
    155 void transfer_list_remove_finished(transfer_list_t *instance, link_t *done)
     153void transfer_list_remove_finished(transfer_list_t *instance, list_t *done)
    156154{
    157155        assert(instance);
     
    159157
    160158        fibril_mutex_lock(&instance->guard);
    161         link_t *current = instance->batch_list.next;
    162         while (current != &instance->batch_list) {
     159        link_t *current = instance->batch_list.head.next;
     160        while (current != &instance->batch_list.head) {
    163161                link_t * const next = current->next;
    164162                usb_transfer_batch_t *batch =
     
    183181        fibril_mutex_lock(&instance->guard);
    184182        while (!list_empty(&instance->batch_list)) {
    185                 link_t * const current = instance->batch_list.next;
     183                link_t * const current = list_first(&instance->batch_list);
    186184                usb_transfer_batch_t *batch =
    187185                    usb_transfer_batch_from_link(current);
     
    214212        qh_t *prev_qh = NULL;
    215213        /* Remove from the hardware queue */
    216         if (instance->batch_list.next == &batch->link) {
     214        if (list_first(&instance->batch_list) == &batch->link) {
    217215                /* I'm the first one here */
    218216                prev_qh = instance->queue_head;
     
    234232        /* Remove from the batch list */
    235233        list_remove(&batch->link);
    236         usb_log_debug("Batch(%p) removed (%s) from %s, next: %x.\n",
    237             batch, qpos, instance->name, batch_qh(batch)->next);
     234        usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT " removed (%s) "
     235            "from %s, next: %x.\n",
     236            batch, USB_TRANSFER_BATCH_ARGS(*batch),
     237            qpos, instance->name, batch_qh(batch)->next);
    238238}
    239239/**
Note: See TracChangeset for help on using the changeset viewer.