Changeset 28eee11c in mainline for uspace/drv/uhci-hcd/transfer_list.c


Ignore:
Timestamp:
2011-03-21T15:12:04Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5287502
Parents:
5971dd3 (diff), 7102aa5 (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:

Function and types renaming

This merge does not involve any change in functionality.

Types and functions that were renamed (see individual commits for details):

  • usb_endpoint_pipe_* ⇒ usb_pipe_*
  • device_keeper_* ⇒ usb_device_keeper_*
    • some functions has more descriptive names now
  • batch_* ⇒ usb_transfer_batch_ *

Also fixed some wrong Doxygen caused by migration from individual drivers.

File:
1 edited

Legend:

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

    r5971dd3 r28eee11c  
    3838
    3939static void transfer_list_remove_batch(
    40     transfer_list_t *instance, batch_t *batch);
     40    transfer_list_t *instance, usb_transfer_batch_t *batch);
    4141/*----------------------------------------------------------------------------*/
    4242/** Initialize transfer list structures.
     
    9292 * The batch is added to the end of the list and queue.
    9393 */
    94 void transfer_list_add_batch(transfer_list_t *instance, batch_t *batch)
     94void transfer_list_add_batch(transfer_list_t *instance, usb_transfer_batch_t *batch)
    9595{
    9696        assert(instance);
     
    115115        } else {
    116116                /* There is something scheduled */
    117                 batch_t *last = list_get_instance(
    118                     instance->batch_list.prev, batch_t, link);
     117                usb_transfer_batch_t *last = list_get_instance(
     118                    instance->batch_list.prev, usb_transfer_batch_t, link);
    119119                qh_set_next_qh(batch_qh(last), pa);
    120120        }
     
    122122        list_append(&batch->link, &instance->batch_list);
    123123
    124         batch_t *first = list_get_instance(
    125             instance->batch_list.next, batch_t, link);
     124        usb_transfer_batch_t *first = list_get_instance(
     125            instance->batch_list.next, usb_transfer_batch_t, link);
    126126        usb_log_debug("Batch(%p) added to queue %s, first is %p.\n",
    127127                batch, instance->name, first);
     
    148148        while (current != &instance->batch_list) {
    149149                link_t *next = current->next;
    150                 batch_t *batch = list_get_instance(current, batch_t, link);
     150                usb_transfer_batch_t *batch = list_get_instance(current, usb_transfer_batch_t, link);
    151151
    152152                if (batch_is_complete(batch)) {
     
    162162                link_t *item = done.next;
    163163                list_remove(item);
    164                 batch_t *batch = list_get_instance(item, batch_t, link);
     164                usb_transfer_batch_t *batch = list_get_instance(item, usb_transfer_batch_t, link);
    165165                batch->next_step(batch);
    166166        }
     
    176176        while (list_empty(&instance->batch_list)) {
    177177                link_t *current = instance->batch_list.next;
    178                 batch_t *batch = list_get_instance(current, batch_t, link);
     178                usb_transfer_batch_t *batch = list_get_instance(current, usb_transfer_batch_t, link);
    179179                transfer_list_remove_batch(instance, batch);
    180                 batch_finish(batch, EIO);
     180                usb_transfer_batch_finish(batch, EIO);
    181181        }
    182182        fibril_mutex_unlock(&instance->guard);
     
    191191 * Does not lock the transfer list, caller is responsible for that.
    192192 */
    193 void transfer_list_remove_batch(transfer_list_t *instance, batch_t *batch)
     193void transfer_list_remove_batch(transfer_list_t *instance, usb_transfer_batch_t *batch)
    194194{
    195195        assert(instance);
     
    207207                pos = "FIRST";
    208208        } else {
    209                 batch_t *prev =
    210                     list_get_instance(batch->link.prev, batch_t, link);
     209                usb_transfer_batch_t *prev =
     210                    list_get_instance(batch->link.prev, usb_transfer_batch_t, link);
    211211                qh_set_next_qh(batch_qh(prev), batch_qh(batch)->next);
    212212                pos = "NOT FIRST";
Note: See TracChangeset for help on using the changeset viewer.