Changeset 1068f6a in mainline for genarch/src/mm/as_ht.c
- Timestamp:
- 2006-05-20T19:32:06Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c1982e45
- Parents:
- 9ea6cc5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
genarch/src/mm/as_ht.c
r9ea6cc5 r1068f6a 40 40 #include <memstr.h> 41 41 #include <adt/hash_table.h> 42 #include <synch/ spinlock.h>42 #include <synch/mutex.h> 43 43 44 44 static pte_t *ht_create(int flags); … … 67 67 if (flags & FLAG_AS_KERNEL) { 68 68 hash_table_create(&page_ht, PAGE_HT_ENTRIES, 2, &ht_operations); 69 mutex_initialize(&page_ht_lock); 69 70 } 70 71 return NULL; … … 82 83 { 83 84 if (lock) 84 spinlock_lock(&as->lock);85 spinlock_lock(&page_ht_lock);85 mutex_lock(&as->lock); 86 mutex_lock(&page_ht_lock); 86 87 } 87 88 … … 96 97 void ht_unlock(as_t *as, bool unlock) 97 98 { 98 spinlock_unlock(&page_ht_lock);99 mutex_unlock(&page_ht_lock); 99 100 if (unlock) 100 spinlock_unlock(&as->lock);101 mutex_unlock(&as->lock); 101 102 }
Note:
See TracChangeset
for help on using the changeset viewer.