Ignore:
File:
1 edited

Legend:

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

    r15f3c3f rb72efe8  
    4141#include <adt/hash_table.h>
    4242#include <ipc/devman.h>
    43 #include <ipc/loc.h>
     43#include <ipc/devmap.h>
    4444#include <fibril_synch.h>
    4545#include <atomic.h>
     
    5353#define DEVICE_BUCKETS 256
    5454
    55 #define LOC_CLASS_NAMESPACE "class"
    56 #define LOC_DEVICE_NAMESPACE "devices"
    57 #define LOC_SEPARATOR '\\'
     55#define DEVMAP_CLASS_NAMESPACE "class"
     56#define DEVMAP_DEVICE_NAMESPACE "devices"
     57#define DEVMAP_SEPARATOR '\\'
    5858
    5959struct dev_node;
     
    172172        /** List of device classes to which this device function belongs. */
    173173        list_t classes;
    174         /** Service ID if the device function is registered with loc. */
    175         service_id_t service_id;
     174        /** Devmap handle if the device function is registered by devmap. */
     175        devmap_handle_t devmap_handle;
    176176       
    177177        /**
     
    181181       
    182182        /**
    183          * Used by the hash table of functions indexed by service IDs.
    184          */
    185         link_t loc_fun;
     183         * Used by the hash table of functions indexed by devmap device handles.
     184         */
     185        link_t devmap_fun;
    186186};
    187187
     
    208208       
    209209        /**
    210          * Hash table of services registered with location service, indexed by
    211          * service IDs.
    212          */
    213         hash_table_t loc_functions;
     210         * Hash table of devices registered by devmapper, indexed by devmap
     211         * handles.
     212         */
     213        hash_table_t devmap_functions;
    214214} dev_tree_t;
    215215
     
    267267        /** The name of the device function within the class. */
    268268        char *dev_name;
    269         /** Service ID in the class namespace. */
    270         service_id_t service_id;
    271        
    272         /**
    273          * Link to hash table of services registered with location service using
     269        /** The handle of the device by device mapper in the class namespace. */
     270        devmap_handle_t devmap_handle;
     271       
     272        /**
     273         * Link in the hash table of devices registered by the devmapper using
    274274         * their class names.
    275275         */
    276         link_t loc_link;
     276        link_t devmap_link;
    277277} dev_class_info_t;
    278278
     
    283283       
    284284        /**
    285          * Hash table of services registered with location service using their
    286          * class name, indexed by service IDs.
    287          */
    288         hash_table_t loc_functions;
     285         * Hash table of devices registered by devmapper using their class name,
     286         * indexed by devmap handles.
     287         */
     288        hash_table_t devmap_functions;
    289289       
    290290        /** Fibril mutex for list of classes. */
     
    364364extern void add_dev_class_no_lock(class_list_t *, dev_class_t *);
    365365
    366 /* Loc services */
    367 
    368 extern void loc_register_tree_function(fun_node_t *, dev_tree_t *);
    369 
    370 extern fun_node_t *find_loc_tree_function(dev_tree_t *, service_id_t);
    371 extern fun_node_t *find_loc_class_function(class_list_t *, service_id_t);
    372 
    373 extern void class_add_loc_function(class_list_t *, dev_class_info_t *);
    374 extern void tree_add_loc_function(dev_tree_t *, fun_node_t *);
     366/* Devmap devices */
     367
     368extern void devmap_register_tree_function(fun_node_t *, dev_tree_t *);
     369
     370extern fun_node_t *find_devmap_tree_function(dev_tree_t *, devmap_handle_t);
     371extern fun_node_t *find_devmap_class_function(class_list_t *, devmap_handle_t);
     372
     373extern void class_add_devmap_function(class_list_t *, dev_class_info_t *);
     374extern void tree_add_devmap_function(dev_tree_t *, fun_node_t *);
    375375
    376376#endif
Note: See TracChangeset for help on using the changeset viewer.