Changeset 10d6b858 in mainline
- Timestamp:
 - 2008-01-06T16:40:58Z (18 years ago)
 - Branches:
 - lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
 - Children:
 - 222e57c
 - Parents:
 - 4db6eaf
 - Location:
 - uspace/srv/vfs
 - Files:
 - 
      
- 3 edited
 
- 
          
  vfs.h (modified) (1 diff)
 - 
          
  vfs_file.c (modified) (1 diff)
 - 
          
  vfs_rdwr.c (modified) (2 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
uspace/srv/vfs/vfs.h
r4db6eaf r10d6b858 148 148 */ 149 149 typedef struct { 150 /** Serializes access to this open file. */ 151 futex_t lock; 152 150 153 vfs_node_t *node; 151 154  - 
      
uspace/srv/vfs/vfs_file.c
r4db6eaf r10d6b858 87 87 return ENOMEM; 88 88 memset(files[i], 0, sizeof(vfs_file_t)); 89 futex_initialize(&files[i]->lock, 1); 89 90 vfs_file_addref(files[i]); 90 91 return i;  - 
      
uspace/srv/vfs/vfs_rdwr.c
r4db6eaf r10d6b858 83 83 84 84 /* 85 * Lock the open file structure so that no other thread can manipulate 86 * the same open file at a time. 87 */ 88 futex_down(&file->lock); 89 90 /* 85 91 * Lock the file's node so that no other client can read/write to it at 86 92 * the same time. … … 127 133 128 134 /* 129 * Update the position pointer .135 * Update the position pointer and unlock the open file. 130 136 */ 131 137 file->pos += bytes; 138 futex_up(&file->lock); 132 139 133 140 /*  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  