Added more syscalls
[akaros.git] / user / parlib / src / newlib_backend.c
index b453d1d..804ddf0 100644 (file)
@@ -26,6 +26,8 @@ void* sbrk(ptrdiff_t incr)
        uint8_t* prev_heap_end; 
        prev_heap_end = heap_end;
        if (sys_brk(heap_end + incr) < 0) {
+               debug_in_out("\tsys_brk(%p+%d) failed\n",heap_end,incr);
+               hart_lock_unlock(&sbrk_lock);
                errno = ENOMEM;
                return (void*CT(1))TC(-1);
        }