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

Changeset e85920d in mainline for uspace/srv/devman/devman.h


Ignore:
Timestamp:
2010-02-18T15:23:15Z (12 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master
Children:
0c3666d
Parents:
08d9c4e6
Message:

parts of device manager

File:
1 edited

Legend:

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

    r08d9c4e6 re85920d  
    4040#include <adt/list.h>
    4141#include <ipc/ipc.h>
     42#include <fibril_synch.h>
    4243
    4344#include "util.h"
     
    7475} match_id_list_t;
    7576
     77typedef enum {
     78        /** driver has not been started */
     79        DRIVER_NOT_STARTED = 0,
     80        /** driver has been started, but has not registered as running and ready to receive requests */
     81        DRIVER_STARTING,
     82        /** driver is running and prepared to serve incomming requests */
     83        DRIVER_RUNNING
     84} driver_state_t;
     85
    7686/** Representation of device driver.
    7787 */
     
    7989        /** Pointers to previous and next drivers in a linked list */
    8090        link_t drivers;
    81         /** Specifies whether the driver has been started.*/
    82         bool running;
     91        /** Specifies whether the driver has been started and wheter is running and prepared to receive requests.*/
     92        int state;
    8393        /** Phone asociated with this driver */
    8494        ipcarg_t phone;
     
    91101        /** Pointer to the linked list of devices controlled by this driver */
    92102        link_t devices;
     103        /** Fibril mutex for this driver - driver state, list of devices, phone.*/
     104        fibril_mutex_t driver_mutex;
    93105} driver_t;
     106
     107/** The list of drivers. */
     108typedef struct driver_list {
     109        /** List of drivers */
     110        link_t drivers;
     111        /** Fibril mutex for list of drivers. */
     112        fibril_mutex_t drivers_mutex;   
     113} driver_list_t;
    94114
    95115/** Representation of a node in the device tree.*/
     
    101121        /** List of child device nodes. */
    102122        link_t children;
     123        /** Fibril mutex for the list of child device nodes of this node. */
     124        fibril_mutex_t children_mutex;
    103125        /** List of device ids for device-to-driver matching.*/
    104126        match_id_list_t match_ids;
Note: See TracChangeset for help on using the changeset viewer.