Changeset c3d9aaf5 in mainline for uspace/srv/devman/dev.c
- Timestamp:
- 2025-02-03T15:52:08Z (19 hours ago)
- Branches:
- master
- Children:
- b1490d2
- Parents:
- a796812c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/dev.c
ra796812c rc3d9aaf5 1 1 /* 2 * Copyright (c) 2025 Jiri Svoboda 2 3 * Copyright (c) 2010 Lenka Trochtova 3 4 * All rights reserved. … … 50 51 refcount_init(&dev->refcnt); 51 52 list_initialize(&dev->functions); 53 fibril_mutex_initialize(&dev->state_lock); 54 fibril_condvar_initialize(&dev->state_cv); 52 55 link_initialize(&dev->driver_devices); 53 56 … … 87 90 if (refcount_down(&dev->refcnt)) 88 91 delete_dev_node(dev); 92 } 93 94 /** Wait until the device node enters stable state. 95 * 96 * @param dev Device node 97 */ 98 void dev_wait_stable(dev_node_t *dev) 99 { 100 fibril_mutex_lock(&dev->state_lock); 101 while (dev->state == DEVICE_ATTACHING) 102 fibril_condvar_wait(&dev->state_cv, &dev->state_lock); 103 fibril_mutex_unlock(&dev->state_lock); 89 104 } 90 105
Note:
See TracChangeset
for help on using the changeset viewer.