Changeset d30e067 in mainline for uspace/srv/devman/drv_conn.c
- Timestamp:
- 2025-03-02T20:02:33Z (5 months ago)
- Children:
- 8cdf360
- Parents:
- 7debda3 (diff), 4285f384 (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/srv/devman/drv_conn.c
r7debda3 rd30e067 1 1 /* 2 * Copyright (c) 202 3Jiri Svoboda2 * Copyright (c) 2025 Jiri Svoboda 3 3 * Copyright (c) 2010 Lenka Trochtova 4 4 * All rights reserved. … … 453 453 fun_busy_unlock(fun); 454 454 fun_del_ref(fun); 455 async_answer_0(icall, EOK); 456 } 457 458 /** Wait for function to become stable. 459 * 460 */ 461 static void devman_drv_fun_wait_stable(ipc_call_t *icall, driver_t *drv) 462 { 463 fun_node_t *fun; 464 dev_node_t *dev; 465 466 fibril_rwlock_read_lock(&device_tree.rwlock); 467 468 fun = find_fun_node(&device_tree, ipc_get_arg1(icall)); 469 if (fun == NULL) { 470 fibril_rwlock_read_unlock(&device_tree.rwlock); 471 async_answer_0(icall, ENOENT); 472 return; 473 } 474 475 if (fun->child == NULL) { 476 fibril_rwlock_read_unlock(&device_tree.rwlock); 477 fun_del_ref(fun); 478 async_answer_0(icall, EOK); 479 return; 480 } 481 482 dev = fun->child; 483 dev_add_ref(dev); 484 485 fibril_rwlock_read_unlock(&device_tree.rwlock); 486 487 dev_wait_stable(dev); 488 dev_del_ref(dev); 489 455 490 async_answer_0(icall, EOK); 456 491 } … … 642 677 devman_drv_fun_offline(&call, driver); 643 678 break; 679 case DEVMAN_DRV_FUN_WAIT_STABLE: 680 devman_drv_fun_wait_stable(&call, driver); 681 break; 644 682 case DEVMAN_REMOVE_FUNCTION: 645 683 devman_remove_function(&call);
Note:
See TracChangeset
for help on using the changeset viewer.