Changeset ab49a0d in mainline for uspace/srv/devman/devman.c
- Timestamp:
- 2010-12-23T16:11:01Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 467bf40, 77cea41
- Parents:
- 8dd039a (diff), 8240dc5a (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/devman.c
r8dd039a rab49a0d 392 392 printf(NAME ": create_root_node\n"); 393 393 394 fibril_rwlock_write_lock(&tree->rwlock); 394 395 node = create_dev_node(); 395 396 if (node != NULL) { … … 401 402 tree->root_node = node; 402 403 } 404 fibril_rwlock_write_unlock(&tree->rwlock); 403 405 404 406 return node != NULL; … … 463 465 /** Start a driver 464 466 * 465 * The driver's mutex is assumed to be locked.466 *467 467 * @param drv The driver's structure. 468 468 * @return True if the driver's task is successfully spawned, false … … 473 473 int rc; 474 474 475 assert(fibril_mutex_is_locked(&drv->driver_mutex)); 476 475 477 printf(NAME ": start_driver '%s'\n", drv->name); 476 478 … … 867 869 /** Find the device node structure of the device witch has the specified handle. 868 870 * 869 * Device tree's rwlock should be held at least for reading.870 *871 871 * @param tree The device tree where we look for the device node. 872 872 * @param handle The handle of the device. … … 876 876 { 877 877 unsigned long key = handle; 878 link_t *link = hash_table_find(&tree->devman_devices, &key); 878 link_t *link; 879 880 assert(fibril_rwlock_is_locked(&tree->rwlock)); 881 882 link = hash_table_find(&tree->devman_devices, &key); 879 883 return hash_table_get_instance(link, node_t, devman_link); 880 884 } … … 932 936 /** Insert new device into device tree. 933 937 * 934 * The device tree's rwlock should be already held exclusively when calling this935 * function.936 *937 938 * @param tree The device tree. 938 939 * @param node The newly added device node. … … 949 950 assert(tree != NULL); 950 951 assert(dev_name != NULL); 952 assert(fibril_rwlock_is_write_locked(&tree->rwlock)); 951 953 952 954 node->name = dev_name;
Note:
See TracChangeset
for help on using the changeset viewer.