Rev 4537 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4537 | Rev 4668 | ||
---|---|---|---|
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 <adt/list.h> |
37 | #include <adt/list.h> |
38 | #include <fibril_sync.h> |
38 | #include <fibril_sync.h> |
39 | #include <futex.h> |
- | |
40 | #include <sys/types.h> |
39 | #include <sys/types.h> |
41 | #include <devmap.h> |
40 | #include <devmap.h> |
42 | #include <bool.h> |
41 | #include <bool.h> |
43 | #include <ipc/vfs.h> |
42 | #include <ipc/vfs.h> |
44 | 43 | ||
Line 143... | Line 142... | ||
143 | 142 | ||
144 | /** Current position in the file. */ |
143 | /** Current position in the file. */ |
145 | off_t pos; |
144 | off_t pos; |
146 | } vfs_file_t; |
145 | } vfs_file_t; |
147 | 146 | ||
148 | extern futex_t nodes_futex; |
147 | extern fibril_mutex_t nodes_mutex; |
149 | 148 | ||
- | 149 | extern fibril_condvar_t fs_head_cv; |
|
- | 150 | extern fibril_mutex_t fs_head_lock; |
|
150 | extern link_t fs_head; /**< List of registered file systems. */ |
151 | extern link_t fs_head; /**< List of registered file systems. */ |
151 | 152 | ||
152 | extern vfs_pair_t rootfs; /**< Root file system. */ |
153 | extern vfs_pair_t rootfs; /**< Root file system. */ |
153 | 154 | ||
154 | /** Each instance of this type describes one path lookup in progress. */ |
155 | /** Each instance of this type describes one path lookup in progress. */ |
Line 156... | Line 157... | ||
156 | link_t plb_link; /**< Active PLB entries list link. */ |
157 | link_t plb_link; /**< Active PLB entries list link. */ |
157 | unsigned index; /**< Index of the first character in PLB. */ |
158 | unsigned index; /**< Index of the first character in PLB. */ |
158 | size_t len; /**< Number of characters in this PLB entry. */ |
159 | size_t len; /**< Number of characters in this PLB entry. */ |
159 | } plb_entry_t; |
160 | } plb_entry_t; |
160 | 161 | ||
161 | extern futex_t plb_futex; /**< Futex protecting plb and plb_head. */ |
162 | extern fibril_mutex_t plb_mutex;/**< Mutex protecting plb and plb_head. */ |
162 | extern uint8_t *plb; /**< Path Lookup Buffer */ |
163 | extern uint8_t *plb; /**< Path Lookup Buffer */ |
163 | extern link_t plb_head; /**< List of active PLB entries. */ |
164 | extern link_t plb_head; /**< List of active PLB entries. */ |
164 | 165 | ||
165 | #define MAX_MNTOPTS_LEN 256 |
166 | #define MAX_MNTOPTS_LEN 256 |
166 | 167 | ||
Line 191... | Line 192... | ||
191 | extern void vfs_file_delref(vfs_file_t *); |
192 | extern void vfs_file_delref(vfs_file_t *); |
192 | 193 | ||
193 | extern void vfs_node_addref(vfs_node_t *); |
194 | extern void vfs_node_addref(vfs_node_t *); |
194 | extern void vfs_node_delref(vfs_node_t *); |
195 | extern void vfs_node_delref(vfs_node_t *); |
195 | 196 | ||
196 | extern void vfs_process_pending_mount(void); |
- | |
197 | extern void vfs_register(ipc_callid_t, ipc_call_t *); |
197 | extern void vfs_register(ipc_callid_t, ipc_call_t *); |
198 | extern void vfs_mount(ipc_callid_t, ipc_call_t *); |
198 | extern void vfs_mount(ipc_callid_t, ipc_call_t *); |
199 | extern void vfs_open(ipc_callid_t, ipc_call_t *); |
199 | extern void vfs_open(ipc_callid_t, ipc_call_t *); |
200 | extern void vfs_open_node(ipc_callid_t, ipc_call_t *); |
200 | extern void vfs_open_node(ipc_callid_t, ipc_call_t *); |
201 | extern void vfs_device(ipc_callid_t, ipc_call_t *); |
- | |
202 | extern void vfs_sync(ipc_callid_t, ipc_call_t *); |
201 | extern void vfs_sync(ipc_callid_t, ipc_call_t *); |
203 | extern void vfs_node(ipc_callid_t, ipc_call_t *); |
- | |
204 | extern void vfs_close(ipc_callid_t, ipc_call_t *); |
202 | extern void vfs_close(ipc_callid_t, ipc_call_t *); |
205 | extern void vfs_read(ipc_callid_t, ipc_call_t *); |
203 | extern void vfs_read(ipc_callid_t, ipc_call_t *); |
206 | extern void vfs_write(ipc_callid_t, ipc_call_t *); |
204 | extern void vfs_write(ipc_callid_t, ipc_call_t *); |
207 | extern void vfs_seek(ipc_callid_t, ipc_call_t *); |
205 | extern void vfs_seek(ipc_callid_t, ipc_call_t *); |
208 | extern void vfs_truncate(ipc_callid_t, ipc_call_t *); |
206 | extern void vfs_truncate(ipc_callid_t, ipc_call_t *); |
- | 207 | extern void vfs_fstat(ipc_callid_t, ipc_call_t *); |
|
- | 208 | extern void vfs_fstat(ipc_callid_t, ipc_call_t *); |
|
- | 209 | extern void vfs_stat(ipc_callid_t, ipc_call_t *); |
|
209 | extern void vfs_mkdir(ipc_callid_t, ipc_call_t *); |
210 | extern void vfs_mkdir(ipc_callid_t, ipc_call_t *); |
210 | extern void vfs_unlink(ipc_callid_t, ipc_call_t *); |
211 | extern void vfs_unlink(ipc_callid_t, ipc_call_t *); |
211 | extern void vfs_rename(ipc_callid_t, ipc_call_t *); |
212 | extern void vfs_rename(ipc_callid_t, ipc_call_t *); |
212 | 213 | ||
213 | #endif |
214 | #endif |