Changes in kernel/genarch/src/mm/as_ht.c [f97f1e51:fb63c06] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/mm/as_ht.c
rf97f1e51 rfb63c06 77 77 if (flags & FLAG_AS_KERNEL) { 78 78 hash_table_create(&page_ht, PAGE_HT_ENTRIES, 2, &ht_operations); 79 mutex_initialize(&page_ht_lock, MUTEX_PASSIVE);80 79 pte_cache = slab_cache_create("pte_t", sizeof(pte_t), 0, 81 80 NULL, NULL, SLAB_CACHE_MAGDEFERRED); … … 99 98 /** Lock page table. 100 99 * 101 * Lock address space and page hash table.100 * Lock address space. 102 101 * Interrupts must be disabled. 103 102 * … … 110 109 if (lock) 111 110 mutex_lock(&as->lock); 112 113 mutex_lock(&page_ht_lock);114 111 } 115 112 116 113 /** Unlock page table. 117 114 * 118 * Unlock address space and page hash table.115 * Unlock address space. 119 116 * Interrupts must be disabled. 120 117 * … … 125 122 void ht_unlock(as_t *as, bool unlock) 126 123 { 127 mutex_unlock(&page_ht_lock);128 129 124 if (unlock) 130 125 mutex_unlock(&as->lock); … … 140 135 bool ht_locked(as_t *as) 141 136 { 142 return (mutex_locked(&page_ht_lock) && mutex_locked(&as->lock));137 return mutex_locked(&as->lock); 143 138 } 144 139
Note:
See TracChangeset
for help on using the changeset viewer.