Changeset 729fa2d6 in mainline for uspace/srv/devman/devman.c
- Timestamp:
- 2010-02-25T14:29:23Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 92413de
- Parents:
- 924c75e1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/devman.c
r924c75e1 r729fa2d6 348 348 349 349 fibril_mutex_lock(&drivers_list->drivers_mutex); 350 350 351 link_t *link = drivers_list->drivers.next; 351 352 while (link != &drivers_list->drivers) { … … 358 359 link = link->next; 359 360 } 361 360 362 fibril_mutex_unlock(&drivers_list->drivers_mutex); 361 363 … … 404 406 drv->state = DRIVER_STARTING; 405 407 return true; 408 } 409 410 driver_t * find_driver(driver_list_t *drv_list, const char *drv_name) 411 { 412 driver_t *res = NULL; 413 414 fibril_mutex_lock(&drv_list->drivers_mutex); 415 416 driver_t *drv = NULL; 417 link_t *link = drv_list->drivers.next; 418 while (link != &drv_list->drivers) { 419 drv = list_get_instance(link, driver_t, drivers); 420 if (0 == str_cmp(drv->name, drv_name)) { 421 res = drv; 422 break; 423 } 424 link = link->next; 425 } 426 427 fibril_mutex_unlock(&drv_list->drivers_mutex); 428 429 return res; 406 430 } 407 431
Note:
See TracChangeset
for help on using the changeset viewer.