Subversion Repositories HelenOS

Rev

Rev 3623 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3623 Rev 3675
Line 421... Line 421...
421
    futex_up(&used_futex);
421
    futex_up(&used_futex);
422
 
422
 
423
    return fidx;
423
    return fidx;
424
}
424
}
425
 
425
 
-
 
426
void fat_idx_hashin(fat_idx_t *idx)
-
 
427
{
-
 
428
    unsigned long pkey[] = {
-
 
429
        [UPH_DH_KEY] = idx->dev_handle,
-
 
430
        [UPH_PFC_KEY] = idx->pfc,
-
 
431
        [UPH_PDI_KEY] = idx->pdi,
-
 
432
    };
-
 
433
 
-
 
434
    futex_down(&used_futex);
-
 
435
    hash_table_insert(&up_hash, pkey, &idx->uph_link);
-
 
436
    futex_up(&used_futex);
-
 
437
}
-
 
438
 
-
 
439
void fat_idx_hashout(fat_idx_t *idx)
-
 
440
{
-
 
441
    unsigned long pkey[] = {
-
 
442
        [UPH_DH_KEY] = idx->dev_handle,
-
 
443
        [UPH_PFC_KEY] = idx->pfc,
-
 
444
        [UPH_PDI_KEY] = idx->pdi,
-
 
445
    };
-
 
446
 
-
 
447
    futex_down(&used_futex);
-
 
448
    hash_table_remove(&up_hash, pkey, 3);
-
 
449
    futex_up(&used_futex);
-
 
450
}
-
 
451
 
426
fat_idx_t *
452
fat_idx_t *
427
fat_idx_get_by_index(dev_handle_t dev_handle, fs_index_t index)
453
fat_idx_get_by_index(dev_handle_t dev_handle, fs_index_t index)
428
{
454
{
429
    fat_idx_t *fidx = NULL;
455
    fat_idx_t *fidx = NULL;
430
    link_t *l;
456
    link_t *l;