Changeset c1a0488 in mainline for uspace/srv/devman/devman.c


Ignore:
Timestamp:
2011-09-02T15:58:02Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e2b9b341
Parents:
aff587f
Message:

Track basic device and function states.

File:
1 edited

Legend:

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

    raff587f rc1a0488  
    846846                add_device(drv, dev, tree);
    847847       
     848        fibril_mutex_lock(&drv->driver_mutex);
     849        fibril_mutex_unlock(&drv->driver_mutex);
     850
     851        fibril_rwlock_write_lock(&tree->rwlock);
     852        if (dev->pfun != NULL) {
     853                dev->pfun->state = FUN_ON_LINE;
     854        }
     855        fibril_rwlock_write_unlock(&tree->rwlock);
    848856        return true;
    849857}
     
    11061114                return NULL;
    11071115       
     1116        fun->state = FUN_INIT;
    11081117        atomic_set(&fun->refcnt, 0);
    11091118        link_initialize(&fun->dev_functions);
     
    12751284        dev->pfun->child = NULL;
    12761285        dev->pfun = NULL;
     1286       
     1287        dev->state = DEVICE_REMOVED;
    12771288}
    12781289
     
    13381349       
    13391350        fun->dev = NULL;
     1351        fun->state = FUN_REMOVED;
    13401352}
    13411353
Note: See TracChangeset for help on using the changeset viewer.