Changeset 63e27ef in mainline for kernel/genarch/src/mm/page_ht.c
- Timestamp:
- 2017-06-19T21:47:42Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- deacc58d
- Parents:
- 7354b5e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/mm/page_ht.c
r7354b5e r63e27ef 48 48 #include <synch/spinlock.h> 49 49 #include <arch.h> 50 #include < debug.h>50 #include <assert.h> 51 51 #include <adt/hash_table.h> 52 52 #include <align.h> … … 137 137 bool compare(sysarg_t key[], size_t keys, link_t *item) 138 138 { 139 ASSERT(item);140 ASSERT(keys > 0);141 ASSERT(keys <= PAGE_HT_KEYS);139 assert(item); 140 assert(keys > 0); 141 assert(keys <= PAGE_HT_KEYS); 142 142 143 143 /* … … 161 161 void remove_callback(link_t *item) 162 162 { 163 ASSERT(item);163 assert(item); 164 164 165 165 /* … … 191 191 }; 192 192 193 ASSERT(page_table_locked(as));193 assert(page_table_locked(as)); 194 194 195 195 irq_spinlock_lock(&page_ht_lock, true); … … 197 197 if (!hash_table_find(&page_ht, key)) { 198 198 pte_t *pte = slab_alloc(pte_cache, FRAME_LOWMEM | FRAME_ATOMIC); 199 ASSERT(pte != NULL);199 assert(pte != NULL); 200 200 201 201 pte->g = (flags & PAGE_GLOBAL) != 0; … … 241 241 }; 242 242 243 ASSERT(page_table_locked(as));243 assert(page_table_locked(as)); 244 244 245 245 irq_spinlock_lock(&page_ht_lock, true); … … 261 261 }; 262 262 263 ASSERT(nolock || page_table_locked(as));263 assert(nolock || page_table_locked(as)); 264 264 265 265 link_t *cur = hash_table_find(&page_ht, key); … … 307 307 panic("Updating non-existent PTE"); 308 308 309 ASSERT(pte->as == t->as);310 ASSERT(pte->page == t->page);311 ASSERT(pte->frame == t->frame);312 ASSERT(pte->g == t->g);313 ASSERT(pte->x == t->x);314 ASSERT(pte->w == t->w);315 ASSERT(pte->k == t->k);316 ASSERT(pte->c == t->c);317 ASSERT(pte->p == t->p);309 assert(pte->as == t->as); 310 assert(pte->page == t->page); 311 assert(pte->frame == t->frame); 312 assert(pte->g == t->g); 313 assert(pte->x == t->x); 314 assert(pte->w == t->w); 315 assert(pte->k == t->k); 316 assert(pte->c == t->c); 317 assert(pte->p == t->p); 318 318 319 319 t->a = pte->a;
Note:
See TracChangeset
for help on using the changeset viewer.