Changes in kernel/generic/src/lib/ra.c [1295a1da:41deb2a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/lib/ra.c
r1295a1da r41deb2a 185 185 return NULL; 186 186 187 irq_spinlock_initialize(&arena->lock, "arena_lock");187 spinlock_initialize(&arena->lock, "arena_lock"); 188 188 list_initialize(&arena->spans); 189 189 … … 209 209 210 210 /* TODO: check for overlaps */ 211 irq_spinlock_lock(&arena->lock, true);211 spinlock_lock(&arena->lock); 212 212 list_append(&span->span_link, &arena->spans); 213 irq_spinlock_unlock(&arena->lock, true);213 spinlock_unlock(&arena->lock); 214 214 return true; 215 215 } … … 390 390 ASSERT(ispwr2(alignment)); 391 391 392 irq_spinlock_lock(&arena->lock, true);392 spinlock_lock(&arena->lock); 393 393 list_foreach(arena->spans, cur) { 394 394 ra_span_t *span = list_get_instance(cur, ra_span_t, span_link); … … 398 398 break; 399 399 } 400 irq_spinlock_unlock(&arena->lock, true);400 spinlock_unlock(&arena->lock); 401 401 402 402 return base; … … 406 406 void ra_free(ra_arena_t *arena, uintptr_t base, size_t size) 407 407 { 408 irq_spinlock_lock(&arena->lock, true);408 spinlock_lock(&arena->lock); 409 409 list_foreach(arena->spans, cur) { 410 410 ra_span_t *span = list_get_instance(cur, ra_span_t, span_link); … … 412 412 if (iswithin(span->base, span->size, base, size)) { 413 413 ra_span_free(span, base, size); 414 irq_spinlock_unlock(&arena->lock, true);414 spinlock_unlock(&arena->lock); 415 415 return; 416 416 } 417 417 } 418 irq_spinlock_unlock(&arena->lock, true);418 spinlock_unlock(&arena->lock); 419 419 420 420 panic("Freeing to wrong arena (base=%" PRIxn ", size=%" PRIdn ").",
Note:
See TracChangeset
for help on using the changeset viewer.