Changeset 6f9a9bc in mainline
- Timestamp:
- 2006-06-06T01:04:01Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 874621f
- Parents:
- c74804f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/mm/as.c
rc74804f r6f9a9bc 137 137 { 138 138 ipl_t ipl; 139 link_t *cur;139 bool cond; 140 140 141 141 ASSERT(as->refcount == 0); … … 145 145 * it is safe not to lock its mutex. 146 146 */ 147 148 147 ipl = interrupts_disable(); 149 148 spinlock_lock(&inactive_as_with_asid_lock); 150 151 149 if (as->asid != ASID_INVALID && as != AS_KERNEL) { 152 if ( !as->cpu_refcount)150 if (as != AS && as->cpu_refcount == 0) 153 151 list_remove(&as->inactive_as_with_asid_link); 154 152 asid_put(as->asid); … … 158 156 /* 159 157 * Destroy address space areas of the address space. 158 * The B+tee must be walked carefully because it is 159 * also being destroyed. 160 160 */ 161 for (c ur = as->as_area_btree.leaf_head.next; cur != &as->as_area_btree.leaf_head; cur = cur->next) {161 for (cond = true; cond; ) { 162 162 btree_node_t *node; 163 int i; 164 165 node = list_get_instance(cur, btree_node_t, leaf_link); 166 for (i = 0; i < node->keys; i++) 167 as_area_destroy(as, node->key[i]); 163 164 ASSERT(!list_empty(&as->as_area_btree.leaf_head)); 165 node = list_get_instance(as->as_area_btree.leaf_head.next, btree_node_t, leaf_link); 166 167 if ((cond = node->keys)) { 168 as_area_destroy(as, node->key[0]); 169 } 168 170 } 169 171
Note:
See TracChangeset
for help on using the changeset viewer.