Changeset 1068f6a in mainline for genarch/src/mm
- 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
- Location:
- genarch/src/mm
- Files:
-
- 4 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 } -
genarch/src/mm/as_pt.c
r9ea6cc5 r1068f6a 36 36 #include <mm/frame.h> 37 37 #include <mm/as.h> 38 #include <synch/mutex.h> 38 39 #include <arch/mm/page.h> 39 40 #include <arch/mm/as.h> … … 79 80 80 81 ipl = interrupts_disable(); 81 spinlock_lock(&AS_KERNEL->lock);82 mutex_lock(&AS_KERNEL->lock); 82 83 src_ptl0 = (pte_t *) PA2KA((__address) AS_KERNEL->page_table); 83 84 … … 87 88 memsetb((__address) dst_ptl0, PAGE_SIZE, 0); 88 89 memcpy((void *) dst, (void *) src, PAGE_SIZE - (src - (__address) src_ptl0)); 89 spinlock_unlock(&AS_KERNEL->lock);90 mutex_unlock(&AS_KERNEL->lock); 90 91 interrupts_restore(ipl); 91 92 } … … 105 106 { 106 107 if (lock) 107 spinlock_lock(&as->lock);108 mutex_lock(&as->lock); 108 109 } 109 110 … … 119 120 { 120 121 if (unlock) 121 spinlock_unlock(&as->lock);122 mutex_unlock(&as->lock); 122 123 } -
genarch/src/mm/asid.c
r9ea6cc5 r1068f6a 58 58 #include <arch/mm/asid.h> 59 59 #include <synch/spinlock.h> 60 #include <synch/mutex.h> 60 61 #include <arch.h> 61 62 #include <adt/list.h> … … 104 105 105 106 as = list_get_instance(tmp, as_t, inactive_as_with_asid_link); 106 spinlock_lock(&as->lock);107 mutex_lock_active(&as->lock); 107 108 108 109 /* … … 118 119 */ 119 120 as->asid = ASID_INVALID; 120 spinlock_unlock(&as->lock);121 mutex_unlock(&as->lock); 121 122 122 123 /* -
genarch/src/mm/page_ht.c
r9ea6cc5 r1068f6a 62 62 * locks. 63 63 */ 64 SPINLOCK_INITIALIZE(page_ht_lock);64 mutex_t page_ht_lock; 65 65 66 66 /**
Note:
See TracChangeset
for help on using the changeset viewer.