00001 /* 00002 ** vfsvar.h for lseos in lseos-srv/fs/vfs 00003 ** 00004 ** Copyright(c)2004 Vianney Rancurel 00005 ** Login <vianney@epita.fr> 00006 ** 00007 ** Started on Tue Feb 17 17:14:41 2004 Vianney Rancurel 00008 ** Last update Mon Dec 6 11:55:22 2004 Vianney Rancurel 00009 */ 00010 #ifndef __VFSVAR_H__ 00011 #define __VFSVAR_H__ 1 00012 #include <libc.h> 00013 00014 typedef struct s_vfs_stat 00015 { 00016 int nwrites; 00017 int nreads; 00018 } t_vfs_stat; 00019 00020 struct s_vfs_file; 00021 LIST_HEAD(s_vfs_file_list, s_vfs_file); 00022 typedef struct s_vfs_file_list t_vfs_file_list; 00023 00024 typedef struct s_vfs_file 00025 { 00026 LIST_ENTRY(s_vfs_file) list; 00027 00028 char *name; 00029 struct s_vfs_entry *entry; 00030 } t_vfs_file; 00031 00032 typedef struct s_vfs_entry 00033 { 00034 t_vfs_file_list file_list; 00035 int gate; 00036 u_int32_t pseudo:1; 00037 } t_vfs_entry; 00038 00039 typedef struct s_vfs_fd 00040 { 00041 u_int32_t avail:1; 00042 00043 int gate; 00044 int gate_id; 00045 } t_vfs_fd; 00046 00047 struct s_vfs_proc; 00048 LIST_HEAD(s_vfs_proc_list, s_vfs_proc); 00049 typedef struct s_vfs_proc_list t_vfs_proc_list; 00050 00051 typedef struct s_vfs_proc 00052 { 00053 LIST_ENTRY(s_vfs_proc) list; 00055 pid_t pid; 00056 int nfds; 00057 t_vfs_fd *fds; 00058 char *wd; 00059 } t_vfs_proc; 00060 00061 typedef struct s_vfs_info 00062 { 00063 t_vfs_entry root_entry; 00064 pid_t notify_pid; 00065 00066 __cpu_simple_lock_t lock; 00067 } t_vfs_info; 00068 00069 #endif