Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 5f7d96e in mainline for uspace/srv/devman/devman.c


Ignore:
Timestamp:
2010-12-27T18:18:03Z (11 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master
Children:
43c3937
Parents:
e080332 (diff), e84d65a (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.
Message:

merge from development

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/devman/devman.c

    re080332 r5f7d96e  
    392392        printf(NAME ": create_root_node\n");
    393393
     394        fibril_rwlock_write_lock(&tree->rwlock);
    394395        node = create_dev_node();
    395396        if (node != NULL) {
     
    401402                tree->root_node = node;
    402403        }
     404        fibril_rwlock_write_unlock(&tree->rwlock);
    403405
    404406        return node != NULL;
     
    463465/** Start a driver
    464466 *
    465  * The driver's mutex is assumed to be locked.
    466  *
    467467 * @param drv           The driver's structure.
    468468 * @return              True if the driver's task is successfully spawned, false
     
    473473        int rc;
    474474
     475        assert(fibril_mutex_is_locked(&drv->driver_mutex));
     476       
    475477        printf(NAME ": start_driver '%s'\n", drv->name);
    476478       
     
    867869/** Find the device node structure of the device witch has the specified handle.
    868870 *
    869  * Device tree's rwlock should be held at least for reading.
    870  *
    871871 * @param tree          The device tree where we look for the device node.
    872872 * @param handle        The handle of the device.
     
    876876{
    877877        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);
    879883        return hash_table_get_instance(link, node_t, devman_link);
    880884}
     
    932936/** Insert new device into device tree.
    933937 *
    934  * The device tree's rwlock should be already held exclusively when calling this
    935  * function.
    936  *
    937938 * @param tree          The device tree.
    938939 * @param node          The newly added device node.
     
    949950        assert(tree != NULL);
    950951        assert(dev_name != NULL);
     952        assert(fibril_rwlock_is_write_locked(&tree->rwlock));
    951953       
    952954        node->name = dev_name;
Note: See TracChangeset for help on using the changeset viewer.