Changeset 78a1b7b in mainline
- Timestamp:
- 2008-05-16T21:31:31Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- add5835
- Parents:
- 4452366
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_idx.c
r4452366 r78a1b7b 74 74 /** List of unused structures. */ 75 75 static LIST_INITIALIZE(unused_head); 76 77 /** Futex protecting the up_hash and ui_hash. 78 * 79 * The locking strategy assumes that there will be at most one fibril for each 80 * dev_handle. Therefore it will be sufficient to hold the futex for shorter 81 * times (i.e. only during hash table operations as opposed to holding it the 82 * whole time between an unsuccessful find and the following insert). Should the 83 * assumption break, the locking strategy for this futex will have to be 84 * reconsidered. 85 */ 86 static futex_t used_futex = FUTEX_INITIALIZER; 76 87 77 88 /** … … 340 351 }; 341 352 353 futex_down(&used_futex); 342 354 l = hash_table_find(&up_hash, pkey); 355 futex_up(&used_futex); 343 356 if (l) { 344 357 fidx = hash_table_get_instance(l, fat_idx_t, uph_link); … … 365 378 fidx->nodep = NULL; 366 379 380 futex_down(&used_futex); 367 381 hash_table_insert(&up_hash, pkey, &fidx->uph_link); 368 382 hash_table_insert(&ui_hash, ikey, &fidx->uih_link); 383 futex_up(&used_futex); 369 384 } 370 385 … … 382 397 }; 383 398 399 futex_down(&used_futex); 384 400 l = hash_table_find(&ui_hash, ikey); 401 futex_up(&used_futex); 385 402 if (l) { 386 403 fidx = hash_table_get_instance(l, fat_idx_t, uih_link);
Note:
See TracChangeset
for help on using the changeset viewer.