Changeset 0ec862d in mainline
- Timestamp:
- 2008-10-27T13:28:29Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9f95a80
- Parents:
- cb682eb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_fat.c
rcb682eb r0ec862d 33 33 /** 34 34 * @file fat_fat.c 35 * @brief Functions that manipulate the file allocation tables.35 * @brief Functions that manipulate the File Allocation Tables. 36 36 */ 37 37 … … 45 45 #include <align.h> 46 46 #include <assert.h> 47 #include <futex.h> 48 49 /** 50 * The fat_alloc_lock futex protects all copies of the File Allocation Table 51 * during allocation of clusters. The lock does not have to be held durring 52 * deallocation of clusters. 53 */ 54 static futex_t fat_alloc_lock = FUTEX_INITIALIZER; 47 55 48 56 block_t * … … 261 269 * Search FAT1 for unused clusters. 262 270 */ 271 futex_down(&fat_alloc_lock); 263 272 for (b = 0, cl = 0; b < sf; blk++) { 264 273 blk = block_get(dev_handle, rscnt + b, bps); … … 284 293 *lcl = lifo[0]; 285 294 free(lifo); 295 futex_up(&fat_alloc_lock); 286 296 return EOK; 287 297 } … … 290 300 block_put(blk); 291 301 } 302 futex_up(&fat_alloc_lock); 292 303 293 304 /*
Note:
See TracChangeset
for help on using the changeset viewer.