Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2434 → Rev 2435

/branches/fs/uspace/fs/file.h
32,26 → 32,38
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/** @addtogroup FileSystemImpl
* @{
*/
 
/* This is the filp table. It is an intermediary between file descriptors and
* inodes. A slot is free if filp_count == 0.
*/
/**
* @file file.h
* @brief Filp table definition
*/
#ifndef _FILE_H
#define _FILE_H
 
/**
* This is the filp table. It is an intermediary between file descriptors and
* inodes. A slot is free if filp_count == 0.
*/
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 */
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 */
#define FILP_CLOSED 0 /**< filp_mode: associated device closed */
#define NIL_FILP (filp_t *) 0 /**< indicates absence of a filp slot */
 
#endif /* _FILE_H */
 
 
/**
* }
*/