Changeset 2a2fbc8 in mainline for kernel/genarch/src/mm/as_ht.c
- Timestamp:
- 2016-09-01T17:05:13Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 42d08592
- Parents:
- f126c87 (diff), fb63c06 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/mm/as_ht.c
rf126c87 r2a2fbc8 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.