Changeset 7265558 in mainline for uspace/lib/usbhost/src/endpoint.c


Ignore:
Timestamp:
2011-10-28T20:53:41Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
48ae3ef
Parents:
83c3123
Message:

libusbhost: Drop hash_table and use multiple lists instead.

This has several advantages:
Knowing that all endpoints on one address are in one list makes toggle resets more efficient.
Endpoint search is done only once for inserts and deletes.
Lists are part of the structure and not allocated separately, removing one more failure point from init path.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/endpoint.c

    r83c3123 r7265558  
    133133        instance->toggle = toggle;
    134134}
    135 /*----------------------------------------------------------------------------*/
    136 void endpoint_toggle_reset_filtered(endpoint_t *instance, usb_target_t target)
    137 {
    138         assert(instance);
    139         if (instance->address == target.address &&
    140             (instance->endpoint == target.endpoint || target.endpoint == 0))
    141                 endpoint_toggle_set(instance, 0);
    142 }
    143135/**
    144136 * @}
Note: See TracChangeset for help on using the changeset viewer.