Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2366 → Rev 2367

/branches/fs/uspace/fs/file.h
0,0 → 1,22
/* This is the filp table. It is an intermediary between file descriptors and
* inodes. A slot is free if filp_count == 0.
*/
#ifndef _FILE_H
#define _FILE_H
 
typedef struct {
mode_t filp_mode; /* RW bits, telling how file is opened */
int filp_flags; /* flags from open and fcntl */
int filp_count; /* how many file descriptors share this slot?*/
inode_t *filp_ino; /* pointer to the inode */
offset_t filp_pos; /* file position */
} filp_t;
 
extern filp_t filp[NR_FILPS];
#define FILP_CLOSED 0 /* filp_mode: associated device closed */
#define NIL_FILP (filp_t *) 0 /* indicates absence of a filp slot */
 
#endif /* _FILE_H */