Changeset c31d773 in mainline
- Timestamp:
- 2008-03-09T19:55:42Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 088cecc
- Parents:
- c089919
- Location:
- uspace/srv/vfs
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs.h
rc089919 rc31d773 36 36 #include <ipc/ipc.h> 37 37 #include <libadt/list.h> 38 #include < atomic.h>38 #include <futex.h> 39 39 #include <rwlock.h> 40 40 #include <sys/types.h> … … 108 108 vfs_info_t vfs_info; 109 109 int fs_handle; 110 atomic_t phone_futex; /**< Phone serializing futex. */110 futex_t phone_futex; /**< Phone serializing futex. */ 111 111 ipcarg_t phone; 112 112 } fs_info_t; … … 233 233 } vfs_file_t; 234 234 235 extern futex_t nodes_futex; 236 235 237 extern link_t fs_head; /**< List of registered file systems. */ 236 238 … … 248 250 } plb_entry_t; 249 251 250 extern atomic_t plb_futex; /**< Futex protecting plb and plb_head. */252 extern futex_t plb_futex; /**< Futex protecting plb and plb_head. */ 251 253 extern uint8_t *plb; /**< Path Lookup Buffer */ 252 254 extern link_t plb_head; /**< List of active PLB entries. */ -
uspace/srv/vfs/vfs_lookup.c
rc089919 rc31d773 45 45 #include <futex.h> 46 46 #include <libadt/list.h> 47 #include <atomic.h>48 47 #include <vfs/canonify.h> 49 48 50 49 #define min(a, b) ((a) < (b) ? (a) : (b)) 51 50 52 atomic_t plb_futex = FUTEX_INITIALIZER;51 futex_t plb_futex = FUTEX_INITIALIZER; 53 52 link_t plb_head; /**< PLB entry ring buffer. */ 54 53 uint8_t *plb = NULL; -
uspace/srv/vfs/vfs_node.c
rc089919 rc31d773 39 39 #include <stdlib.h> 40 40 #include <string.h> 41 #include <atomic.h>42 41 #include <futex.h> 43 42 #include <rwlock.h> … … 48 47 49 48 /** Futex protecting the VFS node hash table. */ 50 atomic_t nodes_futex = FUTEX_INITIALIZER;49 futex_t nodes_futex = FUTEX_INITIALIZER; 51 50 52 51 #define NODES_BUCKETS_LOG 8 -
uspace/srv/vfs/vfs_ops.c
rc089919 rc31d773 51 51 #include <fcntl.h> 52 52 #include <assert.h> 53 #include <atomic.h>54 53 #include <vfs/canonify.h> 55 54 … … 63 62 RWLOCK_INITIALIZE(namespace_rwlock); 64 63 65 atomic_t rootfs_futex = FUTEX_INITIALIZER;64 futex_t rootfs_futex = FUTEX_INITIALIZER; 66 65 vfs_triplet_t rootfs = { 67 66 .fs_handle = 0, … … 687 686 */ 688 687 vfs_node_t *node = vfs_node_get(&lr); 688 futex_down(&nodes_futex); 689 689 node->lnkcnt--; 690 futex_up(&nodes_futex); 690 691 rwlock_write_unlock(&namespace_rwlock); 691 692 vfs_node_put(node); … … 811 812 return; 812 813 } 814 futex_down(&nodes_futex); 813 815 new_node->lnkcnt--; 816 futex_up(&nodes_futex); 814 817 break; 815 818 default: … … 831 834 return; 832 835 } 836 futex_down(&nodes_futex); 833 837 old_node->lnkcnt++; 838 futex_up(&nodes_futex); 834 839 /* Destroy the link for the old name. */ 835 840 rc = vfs_lookup_internal(oldc, L_UNLINK, NULL, NULL); … … 844 849 return; 845 850 } 851 futex_down(&nodes_futex); 846 852 old_node->lnkcnt--; 853 futex_up(&nodes_futex); 847 854 rwlock_write_unlock(&namespace_rwlock); 848 855 vfs_node_put(old_node);
Note:
See TracChangeset
for help on using the changeset viewer.