Subversion Repositories shark

Rev

Rev 3 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 pj 1
/*
2
 * Project: HARTIK (HA-rd R-eal TI-me K-ernel)
3
 *
4
 * Coordinators: Giorgio Buttazzo <giorgio@sssup.it>
5
 *               Gerardo Lamastra <gerardo@sssup.it>
6
 *
7
 * Authors     : Massimiliano Giorgi <massy@hartik.sssup.it>
8
 * (see authors.txt for full list of hartik's authors)
9
 *
10
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
11
 *
12
 * http://www.sssup.it
13
 * http://retis.sssup.it
14
 * http://hartik.sssup.it
15
 */
16
 
17
/*
18
 * Copyright (C) 1999 Massimiliano Giorgi
19
 *
20
 * This program is free software; you can redistribute it and/or modify
21
 * it under the terms of the GNU General Public License as published by
22
 * the Free Software Foundation; either version 2 of the License, or
23
 * (at your option) any later version.
24
 *
25
 * This program is distributed in the hope that it will be useful,
26
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28
 * GNU General Public License for more details.
29
 *
30
 * You should have received a copy of the GNU General Public License
31
 * along with this program; if not, write to the Free Software
32
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
33
 *
34
 */
35
 
36
/*
37
 * CVS :        $Id: inode.h,v 1.1.1.1 2002-03-29 14:12:50 pj Exp $
38
 *
39
 * File:        $File$
40
 * Revision:    $Revision: 1.1.1.1 $
41
 * Last update: $Date: 2002-03-29 14:12:50 $
42
 */
43
 
44
/***
45
 This file defines an inode structure and prototypes the functions used to manipulate that structure.
46
 ***/
47
 
48
#ifndef __INODE_H__
49
#define __INODE_H__
50
 
51
#include <fs/fsconf.h>
52
#include <fs/types.h>
53
#include <fs/stat.h>
54
 
55
#include "rwlock.h"
56
 
57
#ifdef MSDOS_FILESYSTEM
58
#include "msdos/msdos_i.h"
59
#endif
60
 
61
struct inode {
62
 
63
#ifdef _PARANOIA
64
  __uint32_t  magic;   /*+ magic number +*/  
65
#endif
66
 
67
  struct stat i_st;
68
 
69
  struct inode *i_next;
70
  struct inode *i_prev;
71
  int           i_hash;
72
 
73
  __rwlock_t i_lock;     /* for read/write on inode's file */
74
 
75
  __uint16_t i_dlink;   /* quanti dentry puntano a questo? */
76
  __uint32_t i_dirty:1;
77
 
78
  struct inode_operations *i_op;
79
  struct super_block      *i_sb;
80
 
81
  union {
82
#ifdef MSDOS_FILESYSTEM
83
    struct msdos_inode_info msdos_i;
84
#endif
85
    unsigned                dummy;
86
  } u;
87
 
88
};
89
 
90
int inode_init(void);
91
 
92
struct inode *catch_inode(void);
93
void free_inode(struct inode *);
94
 
95
void insert_inode(struct inode *ptr);
96
void unlock_inode(struct inode *ptr);
97
int destroy_inode(struct inode *ptr);
98
 
99
int erase_inode(struct inode *prt);
100
 
101
#endif