Changeset bcf23cf in mainline
- Timestamp:
- 2007-09-27T12:38:31Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 37e7dc54
- Parents:
- 5d4e90f0
- Location:
- uspace/srv/vfs
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/Makefile
r5d4e90f0 rbcf23cf 43 43 SOURCES = \ 44 44 vfs.c \ 45 vfs_register.c 45 vfs_register.c \ 46 vfs_lookup.c \ 47 vfs_mount.c 46 48 47 49 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) -
uspace/srv/vfs/vfs.c
r5d4e90f0 rbcf23cf 33 33 /** 34 34 * @file vfs.c 35 * @brief VFS multiplexerfor HelenOS.35 * @brief VFS service for HelenOS. 36 36 */ 37 37 … … 42 42 #include <stdio.h> 43 43 #include <bool.h> 44 #include <string.h> 45 #include <as.h> 44 46 #include <libadt/list.h> 45 47 #include "vfs.h" … … 109 111 printf("VFS: HelenOS VFS server\n"); 110 112 113 /* 114 * Initialize the list of registered file systems. 115 */ 111 116 list_initialize(&fs_head); 117 118 /* 119 * Allocate and initialize the Path Lookup Buffer. 120 */ 121 list_initialize(&plb_head); 122 plb = as_get_mappable_page(PLB_SIZE); 123 // memset(plb, 0, PLB_SIZE); 124 125 /* 126 * Set a connectio handling function/fibril. 127 */ 112 128 async_set_client_connection(vfs_connection); 129 130 /* 131 * Register at the naming service. 132 */ 113 133 ipc_connect_to_me(PHONE_NS, SERVICE_VFS, 0, &phonead); 134 135 /* 136 * Start accepting connections. 137 */ 114 138 async_manager(); 115 139 return 0; -
uspace/srv/vfs/vfs.h
r5d4e90f0 rbcf23cf 37 37 #include <libadt/list.h> 38 38 #include <atomic.h> 39 #include < types.h>39 #include <sys/types.h> 40 40 41 41 #define dprintf(...) printf(__VA_ARGS__) … … 44 44 45 45 #define IPC_METHOD_TO_VFS_OP(m) ((m) - VFS_FIRST) 46 47 typedef int64_t off_t;48 46 49 47 typedef enum { … … 126 124 } vfs_file_t; 127 125 128 extern link_t fs_head; 126 extern link_t fs_head; /**< List of registered file systems. */ 129 127 130 extern void vfs_register(ipc_callid_t rid, ipc_call_t *request); 128 extern vfs_node_t *rootfs; /**< Root node of the root file system. */ 129 130 #define MAX_PATH_LEN (64 * 1024) 131 132 #define PLB_SIZE (2 * MAX_PATH_LEN) 133 134 /** Each instance of this type describes one path lookup in progress. */ 135 typedef struct { 136 link_t plb_link; /**< Active PLB entries list link. */ 137 unsigned index; /**< Index of the first character in PLB. */ 138 size_t len; /**< Number of characters in this PLB entry. */ 139 } plb_entry_t; 140 141 extern atomic_t plb_futex; /**< Futex protecting plb and plb_head. */ 142 extern uint8_t *plb; /**< Path Lookup Buffer */ 143 extern link_t plb_head; /**< List of active PLB entries. */ 144 145 extern void vfs_register(ipc_callid_t, ipc_call_t *); 146 extern void vfs_lookup(ipc_callid_t, ipc_call_t *); 131 147 132 148 #endif
Note:
See TracChangeset
for help on using the changeset viewer.