Changeset b01995b in mainline for uspace/lib/usb/src/host/device_keeper.c
- Timestamp:
- 2011-03-21T23:42:08Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 11dd29b, 62f4212
- Parents:
- 31b568e (diff), 87644b4 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/host/device_keeper.c
r31b568e rb01995b 214 214 fibril_mutex_lock(&instance->guard); 215 215 216 usb_address_t new_address = instance->last_address + 1; 217 while (instance->devices[new_address].occupied) { 216 usb_address_t new_address = instance->last_address; 217 do { 218 ++new_address; 219 if (new_address > USB11_ADDRESS_MAX) 220 new_address = 1; 218 221 if (new_address == instance->last_address) { 219 222 fibril_mutex_unlock(&instance->guard); 220 223 return ENOSPC; 221 224 } 222 if (new_address == USB11_ADDRESS_MAX) 223 new_address = 1; 224 ++new_address; 225 } 225 } while (instance->devices[new_address].occupied); 226 226 227 227 assert(new_address != USB_ADDRESS_DEFAULT);
Note:
See TracChangeset
for help on using the changeset viewer.