Subversion Repositories HelenOS

Rev

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

Rev 4389 Rev 4691
Line 33... Line 33...
33
#ifndef FAT_FAT_H_
33
#ifndef FAT_FAT_H_
34
#define FAT_FAT_H_
34
#define FAT_FAT_H_
35
 
35
 
36
#include "fat_fat.h"
36
#include "fat_fat.h"
37
#include <ipc/ipc.h>
37
#include <ipc/ipc.h>
-
 
38
#include <fibril_sync.h>
38
#include <libfs.h>
39
#include <libfs.h>
39
#include <atomic.h>
40
#include <atomic.h>
40
#include <sys/types.h>
41
#include <sys/types.h>
41
#include <bool.h>
42
#include <bool.h>
42
#include "../../vfs/vfs.h"
43
#include "../../vfs/vfs.h"
Line 158... Line 159...
158
    /** Used indices (position) hash table link. */
159
    /** Used indices (position) hash table link. */
159
    link_t      uph_link;
160
    link_t      uph_link;
160
    /** Used indices (index) hash table link. */
161
    /** Used indices (index) hash table link. */
161
    link_t      uih_link;
162
    link_t      uih_link;
162
 
163
 
163
    futex_t     lock;
164
    fibril_mutex_t  lock;
164
    dev_handle_t    dev_handle;
165
    dev_handle_t    dev_handle;
165
    fs_index_t  index;
166
    fs_index_t  index;
166
    /**
167
    /**
167
     * Parent node's first cluster.
168
     * Parent node's first cluster.
168
     * Zero is used if this node is not linked, in which case nodep must
169
     * Zero is used if this node is not linked, in which case nodep must
Line 179... Line 180...
179
/** FAT in-core node. */
180
/** FAT in-core node. */
180
typedef struct fat_node {
181
typedef struct fat_node {
181
    /** Back pointer to the FS node. */
182
    /** Back pointer to the FS node. */
182
    fs_node_t       *bp;
183
    fs_node_t       *bp;
183
   
184
   
184
    futex_t         lock;
185
    fibril_mutex_t      lock;
185
    fat_node_type_t     type;
186
    fat_node_type_t     type;
186
    fat_idx_t       *idx;
187
    fat_idx_t       *idx;
187
    /**
188
    /**
188
     *  Node's first cluster.
189
     *  Node's first cluster.
189
     *  Zero is used for zero-length nodes.
190
     *  Zero is used for zero-length nodes.
Line 204... Line 205...
204
extern void fat_mount(ipc_callid_t, ipc_call_t *);
205
extern void fat_mount(ipc_callid_t, ipc_call_t *);
205
extern void fat_lookup(ipc_callid_t, ipc_call_t *);
206
extern void fat_lookup(ipc_callid_t, ipc_call_t *);
206
extern void fat_read(ipc_callid_t, ipc_call_t *);
207
extern void fat_read(ipc_callid_t, ipc_call_t *);
207
extern void fat_write(ipc_callid_t, ipc_call_t *);
208
extern void fat_write(ipc_callid_t, ipc_call_t *);
208
extern void fat_truncate(ipc_callid_t, ipc_call_t *);
209
extern void fat_truncate(ipc_callid_t, ipc_call_t *);
-
 
210
extern void fat_stat(ipc_callid_t, ipc_call_t *);
-
 
211
extern void fat_close(ipc_callid_t, ipc_call_t *);
209
extern void fat_destroy(ipc_callid_t, ipc_call_t *);
212
extern void fat_destroy(ipc_callid_t, ipc_call_t *);
-
 
213
extern void fat_open_node(ipc_callid_t, ipc_call_t *);
-
 
214
extern void fat_stat(ipc_callid_t, ipc_call_t *);
-
 
215
extern void fat_sync(ipc_callid_t, ipc_call_t *);
210
 
216
 
211
extern fat_idx_t *fat_idx_get_new(dev_handle_t);
217
extern fat_idx_t *fat_idx_get_new(dev_handle_t);
212
extern fat_idx_t *fat_idx_get_by_pos(dev_handle_t, fat_cluster_t, unsigned);
218
extern fat_idx_t *fat_idx_get_by_pos(dev_handle_t, fat_cluster_t, unsigned);
213
extern fat_idx_t *fat_idx_get_by_index(dev_handle_t, fs_index_t);
219
extern fat_idx_t *fat_idx_get_by_index(dev_handle_t, fs_index_t);
214
extern void fat_idx_destroy(fat_idx_t *);
220
extern void fat_idx_destroy(fat_idx_t *);