Subversion Repositories HelenOS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2367 konopa 1
/* This is the filp table.  It is an intermediary between file descriptors and
2
     * inodes.  A slot is free if filp_count == 0.
3
     */
4
#ifndef _FILE_H
5
#define _FILE_H
6
 
7
typedef struct {
8
      mode_t filp_mode;             /* RW bits, telling how file is opened */
9
      int filp_flags;               /* flags from open and fcntl */
10
      int filp_count;               /* how many file descriptors share this slot?*/
11
      inode_t *filp_ino;        /* pointer to the inode */
12
      offset_t filp_pos;            /* file position */
13
    } filp_t;
14
 
15
extern filp_t filp[NR_FILPS];
16
 
17
#define FILP_CLOSED     0           /* filp_mode: associated device closed */   
18
#define NIL_FILP (filp_t *) 0       /* indicates absence of a filp slot */
19
 
20
#endif /* _FILE_H */
21
 
22