Ignore:
Timestamp:
Mar 18, 2020, 11:16:59 PM (4 years ago)
Author:
alain
Message:

Introduce remote_buf.c/.h & socket.c/.h files.
Update dev_nic.c/.h files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/fs/devfs.h

    r612 r657  
    33 *
    44 * Authors       Mohamed Lamine Karaoui (2014,2015)
    5  *               Alain Greiner (2016,2017)
     5 *               Alain Greiner (2016,2017,2018,2019,2020)
    66 *
    77 * Copyright (c) 2011,2012 UPMC Sorbonne Universites
     
    2626#define _DEVFS_H_
    2727
     28
    2829//////////////////////////////////////////////////////////////////////////////////////////
    29 // The DEVFS File System contains inodes and dentries associated to all chdev descriptors
    30 // availables in the architecture.
     30// The DEVFS File System contains the inodes and dentries associated to the chdev
     31// descriptors available in the architecture.
    3132//
    3233// It is structured as a three levels tree structure :
     
    4142//
    4243// The DEVFS extensions to the generic VFS are the following:
    43 // 1) The vfs_ctx_t "extend" void* field is pointing on the devfs_ctx_t structure.
    44 //    This structure contains two extended pointers on the DEVFS "dev" directory inode,
    45 //    and on the "external" directory inode.
    46 // 2) The vfs_inode_t "extend" void* field is pointing on the chdev descriptor.
     44// 1) The vfs_ctx_t "extend" field is pointing on the devfs_ctx_t structure.
     45// 2) The vfs_inode_t "extend" field is pointing on the chdev descriptor.
    4746//////////////////////////////////////////////////////////////////////////////////////////
    4847
     
    5756}
    5857devfs_ctx_t;
    59 
    60 
    6158/*****************************************************************************************
    62  * This fuction allocates memory from local cluster for a DEVFS context descriptor.
     59 * This fuction allocates memory for a DEVFS context descriptor in cluster identified
     60 * by the <cxy> argument.
    6361 *****************************************************************************************
    64  * @ return a pointer on the created context / return NULL if failure.
     62 * @ cxy     : [in] target cluster identifier.
     63 * @ return an extended pointer on the created context / return NULL if failure.
    6564 ****************************************************************************************/
    66 devfs_ctx_t * devfs_ctx_alloc( void );
     65xptr_t  devfs_ctx_alloc( cxy_t cxy );
    6766
    6867/*****************************************************************************************
     
    7069 * to the relevant VFS context in the local cluster.
    7170 *****************************************************************************************
    72  * @ devfs_ctx               : local pointer on DEVFS context.
     71 * @ devfs_ctx               : [in]  extended pointer on DEVFS context.
    7372 * @ devfs_dev_inode_xp      : [out] extended pointer on  <dev> inode.
    7473 * @ devfs_external_inode_xp : [out] extended pointer on  <external> inode.
    7574 ****************************************************************************************/
    76 void devfs_ctx_init( devfs_ctx_t * devfs_ctx,
    77                      xptr_t        devfs_dev_inode_xp,
    78                      xptr_t        devfs_external_inode_xp );
     75void devfs_ctx_init( xptr_t    devfs_ctx_xp,
     76                     xptr_t    devfs_dev_inode_xp,
     77                     xptr_t    devfs_external_inode_xp );
    7978
    8079/*****************************************************************************************
     
    8382 * @ devfs_ctx   : local pointer on DEVFS context.
    8483 ****************************************************************************************/
    85 void devfs_ctx_destroy( devfs_ctx_t * devfs_ctx );
     84void devfs_ctx_destroy( xptr_t  devfs_ctx_xp );
    8685
    8786/*****************************************************************************************
    88  * This function start to create the DEVFS subtree.
    89  * This function should be called once in the cluster containing the VFS parent inode.
    90  * More precisely, it creates in cluster 0 the "dev" and "external" DEVFS directories.
    91  * For each one, it creates the inode and link the associated dentry to parent inode.
    92  * The DEVFS root inode is linked to the VFS parent inode identified by <parent_inode_xp>.
     87 * This function starts to create the DEVFS subtree.
     88 * This function creates in cluster 0 the "dev" and "external" DEVFS directories.
     89 * For each one, it creates the inode and the associated dentry. The DEVFS root inode
     90 * <dev is linked to the VFS parent inode identified by <parent_inode_xp>.
    9391 *****************************************************************************************
    94  * @ parent_inode_xp         : extended pointer on the parent VFS inode.
     92 * @ parent_inode_xp         : [in]  extended pointer on the parent VFS inode.
    9593 * @ devfs_dev_inode_xp      : [out] extended pointer on created <dev> inode.
    9694 * @ devfs_external_inode_xp : [out] extended pointer on created <external> inode.
     
    105103 * 1. In each cluster (i), it creates the "internal" directory,
    106104 *    linked to the DEVFS "dev" parent directory.
    107  * 2. In each cluster (i), it creates - for each external chdev in cluster (i) -
     105 * 2. In each cluster (i), it creates, for each external chdev in cluster (i),
    108106 *    a pseudo-file, linked to the DEVFS "external" parent directory.
    109  * 3. In each cluster (i), it creates - for each internal chdev in cluster (i) -
     107 * 3. In each cluster (i), it creates, for each internal chdev in cluster (i),
    110108 *    a pseudo-file, linked to the DEVFS "internal" parent directory.
    111109 *****************************************************************************************
    112  * @ devfs_dev_inode_xp      : extended pointer on DEVFS root inode.
    113  * @ devfs_external_inode_xp : extended pointer on DEVFS external inode.
    114  * @ devfs_internal_inode_xp : [out] extended pointer on created <internal> inode.
     110 * @ devfs_dev_inode_xp      : [in]  extended pointer on DEVFS root inode.
     111 * @ devfs_external_inode_xp : [in]  extended pointer on DEVFS external inode.
    115112 ****************************************************************************************/
    116113void devfs_local_init( xptr_t   devfs_dev_inode_xp,
    117                        xptr_t   devfs_external_inode_xp,
    118                        xptr_t * devfs_internal_inode_xp );
     114                       xptr_t   devfs_external_inode_xp );
    119115                       
    120116/******************************************************************************************
Note: See TracChangeset for help on using the changeset viewer.