Changeset bb68433 in mainline for generic/src/mm/as.c
- Timestamp:
- 2006-02-08T22:58:06Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7e4e532
- Parents:
- 85dc2e7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/mm/as.c
r85dc2e7 rbb68433 79 79 as_t *as; 80 80 81 as = (as_t *) malloc(sizeof(as_t)); 82 if (as) { 83 list_initialize(&as->as_with_asid_link); 84 spinlock_initialize(&as->lock, "as_lock"); 85 list_initialize(&as->as_area_head); 86 87 if (flags & FLAG_AS_KERNEL) 88 as->asid = ASID_KERNEL; 89 else 90 as->asid = ASID_INVALID; 91 92 as->page_table = page_table_create(flags); 93 } 81 as = (as_t *) malloc(sizeof(as_t), 0); 82 83 list_initialize(&as->as_with_asid_link); 84 spinlock_initialize(&as->lock, "as_lock"); 85 list_initialize(&as->as_area_head); 86 87 if (flags & FLAG_AS_KERNEL) 88 as->asid = ASID_KERNEL; 89 else 90 as->asid = ASID_INVALID; 91 92 as->page_table = page_table_create(flags); 94 93 95 94 return as; … … 122 121 */ 123 122 124 a = (as_area_t *) malloc(sizeof(as_area_t)); 125 if (a) { 126 spinlock_initialize(&a->lock, "as_area_lock"); 127 128 link_initialize(&a->link); 129 a->type = type; 130 a->size = size; 131 a->base = base; 132 133 list_append(&a->link, &as->as_area_head); 134 } 123 a = (as_area_t *) malloc(sizeof(as_area_t), 0); 124 125 spinlock_initialize(&a->lock, "as_area_lock"); 126 127 link_initialize(&a->link); 128 a->type = type; 129 a->size = size; 130 a->base = base; 131 132 list_append(&a->link, &as->as_area_head); 135 133 136 134 spinlock_unlock(&as->lock);
Note:
See TracChangeset
for help on using the changeset viewer.