Changeset 135486d in mainline for uspace/srv/bd/rd/rd.c


Ignore:
Timestamp:
2012-08-15T14:44:59Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
affaf2e, b546231
Parents:
4802dd7
Message:

Allow more than one client connection to block device.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/rd/rd.c

    r4802dd7 r135486d  
    6868static const size_t block_size = 512;
    6969
    70 static int rd_open(bd_srv_t *);
     70static int rd_open(bd_srvs_t *, bd_srv_t *);
    7171static int rd_close(bd_srv_t *);
    7272static int rd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t);
     
    9393};
    9494
    95 static bd_srv_t bd_srv;
     95static bd_srvs_t bd_srvs;
    9696
    9797static void rd_client_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg)
    9898{
    99         bd_conn(iid, icall, &bd_srv);
     99        bd_conn(iid, icall, &bd_srvs);
    100100}
    101101
    102102/** Open device. */
    103 static int rd_open(bd_srv_t *bd)
     103static int rd_open(bd_srvs_t *bds, bd_srv_t *bd)
    104104{
    105105        return EOK;
     
    175175            (void *) addr_phys, size);
    176176       
    177         bd_srv_init(&bd_srv);
    178         bd_srv.ops = &rd_bd_ops;
     177        bd_srvs_init(&bd_srvs);
     178        bd_srvs.ops = &rd_bd_ops;
    179179       
    180180        async_set_client_connection(rd_client_conn);
Note: See TracChangeset for help on using the changeset viewer.