From ac05903cb194511795d767f1eaa6714265c51be9 Mon Sep 17 00:00:00 2001 From: Mustafa Quraish Date: Sat, 5 Feb 2022 05:50:06 -0500 Subject: Add `lseek` and `mmap` syscall info --- std/common.cup | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'std') diff --git a/std/common.cup b/std/common.cup index 2f69354..b97c43a 100644 --- a/std/common.cup +++ b/std/common.cup @@ -40,6 +40,14 @@ fn wait(status: int*): int { return syscall4(SYS_wait4, -1, status, 0, 0); } +fn lseek(fd: int, offset: int, whence: int): int { + return syscall3(SYS_lseek, fd, offset, whence); +} + +fn mmap(addr: void*, len: int, prot: int, flags: int, fd: int, offset: int): void* { + return syscall6(SYS_mmap, addr, len, prot, flags, fd, offset); +} + /////////////////////////////////////////////////////////////////////////////// // Strings -- cgit v1.2.3