Changeset 879585a3 in mainline for kernel/genarch/src/mm/asid.c
- Timestamp:
- 2007-03-31T22:22:50Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 31d8e10
- Parents:
- 563c2dd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/mm/asid.c
r563c2dd r879585a3 63 63 #include <synch/spinlock.h> 64 64 #include <synch/mutex.h> 65 #include <arch.h>66 65 #include <adt/list.h> 67 66 #include <debug.h> 68 69 /**70 * asidlock protects the asids_allocated counter.71 */72 SPINLOCK_INITIALIZE(asidlock);73 67 74 68 static count_t asids_allocated = 0; … … 91 85 */ 92 86 93 spinlock_lock(&asidlock);94 87 if (asids_allocated == ASIDS_ALLOCABLE) { 95 88 … … 109 102 110 103 as = list_get_instance(tmp, as_t, inactive_as_with_asid_link); 111 mutex_lock_active(&as->lock);112 104 113 105 /* … … 131 123 as_invalidate_translation_cache(as, 0, (count_t) -1); 132 124 133 mutex_unlock(&as->lock);134 135 125 /* 136 126 * Get the system rid of the stolen ASID. … … 157 147 } 158 148 159 spinlock_unlock(&asidlock);160 161 149 return asid; 162 150 } … … 171 159 void asid_put(asid_t asid) 172 160 { 173 ipl_t ipl;174 175 ipl = interrupts_disable();176 spinlock_lock(&asidlock);177 178 161 asids_allocated--; 179 162 asid_put_arch(asid); 180 181 spinlock_unlock(&asidlock);182 interrupts_restore(ipl);183 163 } 184 164
Note:
See TracChangeset
for help on using the changeset viewer.