1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

some code cleanups

This commit is contained in:
Stefan Lankes 2016-03-26 10:03:33 +01:00
parent e7b22d6187
commit 9416b9754c

View file

@ -219,14 +219,13 @@ ssize_t sys_sbrk(ssize_t incr)
vma_t* heap = per_core(current_task)->heap;
static spinlock_t heap_lock = SPINLOCK_INIT;
spinlock_lock(&heap_lock);
if (BUILTIN_EXPECT(!heap, 0)) {
spinlock_unlock(&heap_lock);
kprintf("sys_sbrk: missing heap!\n");
do_abort();
}
spinlock_lock(&heap_lock);
ret = heap->end;
heap->end += incr;
if (heap->end < heap->start)