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

Changeset 924c75e1 in mainline


Ignore:
Timestamp:
2010-02-24T22:09:12Z (12 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master
Children:
729fa2d6
Parents:
0c3666d
Message:

backup (unstable)

Location:
uspace
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/Makefile

    r0c3666d r924c75e1  
    4949        srv/devmap \
    5050        srv/devman \
     51        srv/drivers/root \
    5152        srv/loader \
    5253        srv/ns \
  • uspace/lib/libc/include/ipc/devman.h

    r0c3666d r924c75e1  
    3636#include <ipc/ipc.h>
    3737
     38typedef enum {
     39        DEVMAN_DRIVER = 1,
     40        DEVMAN_CLIENT,
     41        DEVMAN_CONNECT_TO_DEVICE
     42} devman_interface_t;
    3843
    3944typedef enum {
     
    4146        DEVMAN_ADD_CHILD_DEVICE
    4247
    43 } devman_request_t;
     48} driver_to_devman_t;
     49
     50typedef enum {
     51        DRIVER_ADD_DEVICE = IPC_FIRST_USER_METHOD
     52
     53} devman_to_driver_t;
    4454
    4555
  • uspace/srv/devman/devman.h

    r0c3666d r924c75e1  
    201201        list_initialize(&drv->match_ids.ids);
    202202        list_initialize(&drv->devices);
     203        fibril_mutex_initialize(&drv->driver_mutex);   
    203204}
    204205
  • uspace/srv/devman/main.c

    r0c3666d r924c75e1  
    6363 *
    6464 */
    65 static void devman_connection(ipc_callid_t iid, ipc_call_t *icall)
     65static void devman_connection_driver(ipc_callid_t iid, ipc_call_t *icall)
    6666{
    6767        ipc_callid_t callid;
     
    8585                        break;
    8686                }
     87        }
     88}
     89
     90/** Function for handling connections to device manager.
     91 *
     92 */
     93static void devman_connection(ipc_callid_t iid, ipc_call_t *icall)
     94{
     95        // Select interface
     96        switch ((ipcarg_t) (IPC_GET_ARG1(*icall))) {
     97        case DEVMAN_DRIVER:
     98                devman_connection_driver(iid, icall);
     99                break;
     100        /*case DEVMAN_CLIENT:
     101                devmap_connection_client(iid, icall);
     102                break;
     103        case DEVMAN_CONNECT_TO_DEVICE:
     104                // Connect client to selected device
     105                devmap_forward(iid, icall);
     106                break;*/
     107        default:
     108                /* No such interface */
     109                ipc_answer_0(iid, ENOENT);
    87110        }
    88111}
Note: See TracChangeset for help on using the changeset viewer.