Changeset f97717d9 in mainline for uspace/lib/usb/src/host/device_keeper.c
- Timestamp:
- 2011-03-25T16:22:14Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- da3dafc, e6223239
- Parents:
- d8421c4 (diff), f08c560 (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
rd8421c4 rf97717d9 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.