sbrk.c 178 B

123456789
  1. #include <stdint.h>
  2. #include <errno.h>
  3. #include "syscall.h"
  4. void *sbrk(intptr_t inc)
  5. {
  6. if (inc) return (void *)__syscall_ret(-ENOMEM);
  7. return (void *)__syscall(SYS_brk, 0);
  8. }