Changeset ea5f46d in mainline for contrib/arch/uspace/srv/vfs/vfs.adl


Ignore:
Timestamp:
2009-09-15T16:07:26Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2a70672
Parents:
1993f9a
Message:

hierarchical composition of components
(tmpfs, fat, devfs are logical subcomponents of vfs, kbd and fb are subcomponents of console, rd is subcomponent of bd)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/arch/uspace/srv/vfs/vfs.adl

    r1993f9a rea5f46d  
    1 interface vfs {
     1interface vfs extends service {
    22                /* Establish connection */
    33                ipcarg_t ipc_m_connect_me_to(void);
     
    5151                ipcarg_t ipc_m_phone_hungup(void);
    5252        protocol:
    53                 [virtual_fs.bp]
     53                [vfs.bp]
    5454};
    5555
    56 frame vfs {
     56interface fs extends service {
     57                /* Establish connection */
     58                ipcarg_t ipc_m_connect_me_to(void);
     59               
     60                /* Notify filesystem that it was mounted */
     61                ipcarg_t mounted(in ipcarg_t dev_handle, in_copy string opts);
     62               
     63                /* Mount filesystem */
     64                ipcarg_t mount(in ipcarg_t device, in ipcarg_t flags, in_copy string point, in_copy string opts, ...);
     65               
     66                /* Open file by node */
     67                ipcarg_t open_node(in ipcarg_t lflag, in ipcarg_t oflag, in ipcarg_t mode, ...);
     68               
     69                /* Lookup file */
     70                ipcarg_t lookup(in ipcarg_t lflag, in ipcarg_t oflag, in ipcarg_t mode, ...);
     71               
     72                /* Read data from file */
     73                ipcarg_t read(in ipcarg_t dev_handle, in ipcarg_t fs_index, in ipcarg_t offset, out_copy stream data);
     74               
     75                /* Write data to file */
     76                ipcarg_t write(in ipcarg_t dev_handle, in ipcarg_t fs_index, in ipcarg_t offset, out_copy stream data);
     77               
     78                /* Truncate file */
     79                ipcarg_t truncate(in ipcarg_t dev_handle, in ipcarg_t fs_index, in ipcarg_t size);
     80               
     81                /* Get directory entry metadata */
     82                ipcarg_t stat(in ipcarg_t dev_handle, in ipcarg_t fs_index, out_copy stream stat);
     83               
     84                /* Flush file buffers */
     85                ipcarg_t sync(in ipcarg_t dev_handle, in ipcarg_t fs_index);
     86               
     87                /* Notify on file close */
     88                ipcarg_t close(in ipcarg_t dev_handle, in ipcarg_t fs_index);
     89               
     90                /* Close connection */
     91                ipcarg_t ipc_m_phone_hungup(void);
     92};
     93
     94frame vfs_manager {
    5795        provides:
    5896                vfs vfs;
    5997        requires:
    6098                [/uspace/lib/libc/requires%]
    61                 naming_service ns;
     99                fs fs;
     100                ns ns;
    62101        protocol:
    63102                [/uspace/lib/libc/protocol] +
    64                 [vfs.bp]
     103                [vfs_server.bp]
    65104};
     105
     106architecture vfs {
     107        inst vfs_manager vfs;
     108        inst tmpfs tmpfs;
     109        inst fat fat;
     110        inst devfs devfs;
     111       
     112        bind vfs:fs to tmpfs:fs;
     113        bind vfs:fs to fat:fs;
     114        bind vfs:fs to devfs:fs;
     115       
     116        bind tmpfs:vfs to vfs:vfs;
     117        bind fat:vfs to vfs:vfs;
     118        bind devfs:vfs to vfs:vfs;
     119       
     120        delegate vfs to vfs:vfs;
     121       
     122        [/uspace/lib/libc/subsume%vfs]
     123        [/uspace/lib/libc/subsume%tmpfs]
     124        [/uspace/lib/libc/subsume%fat]
     125        [/uspace/lib/libc/subsume%devfs]
     126       
     127        subsume vfs:ns to ns;
     128        subsume tmpfs:ns to ns;
     129        subsume fat:ns to ns;
     130        subsume devfs:ns to ns;
     131       
     132        subsume tmpfs:bd to bd;
     133        subsume fat:bd to bd;
     134       
     135        subsume devfs:devmap_client to devmap_client;
     136        subsume devfs:device to device;
     137};
Note: See TracChangeset for help on using the changeset viewer.