78,8 → 78,8 |
{ |
as_t *as; |
|
as = (as_t *) malloc(sizeof(as_t)); |
if (as) { |
as = (as_t *) malloc(sizeof(as_t), 0); |
|
list_initialize(&as->as_with_asid_link); |
spinlock_initialize(&as->lock, "as_lock"); |
list_initialize(&as->as_area_head); |
90,7 → 90,6 |
as->asid = ASID_INVALID; |
|
as->page_table = page_table_create(flags); |
} |
|
return as; |
} |
121,8 → 120,8 |
* TODO: test as_area which is to be created doesn't overlap with an existing one. |
*/ |
|
a = (as_area_t *) malloc(sizeof(as_area_t)); |
if (a) { |
a = (as_area_t *) malloc(sizeof(as_area_t), 0); |
|
spinlock_initialize(&a->lock, "as_area_lock"); |
|
link_initialize(&a->link); |
131,7 → 130,6 |
a->base = base; |
|
list_append(&a->link, &as->as_area_head); |
} |
|
spinlock_unlock(&as->lock); |
interrupts_restore(ipl); |