Subversion Repositories HelenOS

Rev

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

Rev 2679 Rev 2680
Line 34... Line 34...
34
#define VFS_VFS_H_
34
#define VFS_VFS_H_
35
 
35
 
36
#include <ipc/ipc.h>
36
#include <ipc/ipc.h>
37
#include <libadt/list.h>
37
#include <libadt/list.h>
38
#include <atomic.h>
38
#include <atomic.h>
-
 
39
#include <rwlock.h>
39
#include <sys/types.h>
40
#include <sys/types.h>
40
#include <bool.h>
41
#include <bool.h>
41
 
42
 
42
#define dprintf(...)    printf(__VA_ARGS__)
43
#define dprintf(...)    printf(__VA_ARGS__)
43
 
44
 
Line 133... Line 134...
133
typedef struct {
134
typedef struct {
134
    VFS_TRIPLET;        /**< Identity of the node. */
135
    VFS_TRIPLET;        /**< Identity of the node. */
135
    unsigned refcnt;    /**< Usage counter. */
136
    unsigned refcnt;    /**< Usage counter. */
136
    link_t nh_link;     /**< Node hash-table link. */
137
    link_t nh_link;     /**< Node hash-table link. */
137
 
138
 
138
    /** Holding this futex prevents modifications of the node's contents. */
139
    /** Holding this rwlock prevents modifications of the node's contents. */
139
    atomic_t contents_futex;
140
    atomic_t contents_rwlock;
140
} vfs_node_t;
141
} vfs_node_t;
141
 
142
 
142
/**
143
/**
143
 * Instances of this type represent an open file. If the file is opened by more
144
 * Instances of this type represent an open file. If the file is opened by more
144
 * than one task, there will be a separate structure allocated for each task.
145
 * than one task, there will be a separate structure allocated for each task.