Subversion Repositories HelenOS

Rev

Rev 2404 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2404 Rev 2435
Line 30... Line 30...
30
 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
30
 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
31
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
31
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
32
 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
32
 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
33
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
 */
34
 */
-
 
35
 
-
 
36
/** @addtogroup FileSystemImpl
-
 
37
* @{
-
 
38
*/
35
 
39
 
-
 
40
/**
36
/* This is the filp table.  It is an intermediary between file descriptors and
41
 * @file    file.h
37
     * inodes.  A slot is free if filp_count == 0.
42
 * @brief    Filp table definition
38
     */
43
*/
39
#ifndef _FILE_H
44
#ifndef _FILE_H
40
#define _FILE_H
45
#define _FILE_H
41
 
46
 
-
 
47
/**
-
 
48
 * This is the filp table.  It is an intermediary between file descriptors and
-
 
49
 * inodes.  A slot is free if filp_count == 0.
-
 
50
 */
42
typedef struct {
51
typedef struct {
43
      mode_t filp_mode;             /* RW bits, telling how file is opened */
52
      mode_t filp_mode;             /**< RW bits, telling how file is opened */
44
      int filp_flags;               /* flags from open and fcntl */
53
      int filp_flags;               /**< flags from open and fcntl */
45
      int filp_count;               /* how many file descriptors share this slot?*/
54
      int filp_count;               /**< how many file descriptors share this slot?*/
46
      inode_t *filp_ino;        /* pointer to the inode */
55
      inode_t *filp_ino;            /**< pointer to the inode */
47
      offset_t filp_pos;            /* file position */
56
      offset_t filp_pos;            /**< file position */
48
    } filp_t;
57
    } filp_t;
49
 
58
 
50
extern filp_t filp[NR_FILPS];
59
extern filp_t filp[NR_FILPS];
51
   
60
   
52
#define FILP_CLOSED     0           /* filp_mode: associated device closed */   
61
#define FILP_CLOSED     0           /**< filp_mode: associated device closed */ 
53
#define NIL_FILP (filp_t *) 0       /* indicates absence of a filp slot */
62
#define NIL_FILP (filp_t *) 0       /**< indicates absence of a filp slot */
54
 
63
 
55
#endif /* _FILE_H */
64
#endif /* _FILE_H */
56
 
65
 
-
 
66
/**
-
 
67
 * }
-
 
68
 */
57
 
69