Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/mm/as_ht.c

    rf97f1e51 rfb63c06  
    7777        if (flags & FLAG_AS_KERNEL) {
    7878                hash_table_create(&page_ht, PAGE_HT_ENTRIES, 2, &ht_operations);
    79                 mutex_initialize(&page_ht_lock, MUTEX_PASSIVE);
    8079                pte_cache = slab_cache_create("pte_t", sizeof(pte_t), 0,
    8180                    NULL, NULL, SLAB_CACHE_MAGDEFERRED);
     
    9998/** Lock page table.
    10099 *
    101  * Lock address space and page hash table.
     100 * Lock address space.
    102101 * Interrupts must be disabled.
    103102 *
     
    110109        if (lock)
    111110                mutex_lock(&as->lock);
    112        
    113         mutex_lock(&page_ht_lock);
    114111}
    115112
    116113/** Unlock page table.
    117114 *
    118  * Unlock address space and page hash table.
     115 * Unlock address space.
    119116 * Interrupts must be disabled.
    120117 *
     
    125122void ht_unlock(as_t *as, bool unlock)
    126123{
    127         mutex_unlock(&page_ht_lock);
    128        
    129124        if (unlock)
    130125                mutex_unlock(&as->lock);
     
    140135bool ht_locked(as_t *as)
    141136{
    142         return (mutex_locked(&page_ht_lock) && mutex_locked(&as->lock));
     137        return mutex_locked(&as->lock);
    143138}
    144139
Note: See TracChangeset for help on using the changeset viewer.