diff options
| author | Mustafa Quraish <[email protected]> | 2022-02-05 05:50:06 -0500 |
|---|---|---|
| committer | Mustafa Quraish <[email protected]> | 2022-02-05 08:56:15 -0500 |
| commit | ac05903cb194511795d767f1eaa6714265c51be9 (patch) | |
| tree | adc8191c9f8206538522cd1d4604b0ea3a26e876 /std | |
| parent | Allow function declarations without a definition (diff) | |
| download | cup-ac05903cb194511795d767f1eaa6714265c51be9.tar.xz cup-ac05903cb194511795d767f1eaa6714265c51be9.zip | |
Add `lseek` and `mmap` syscall info
Diffstat (limited to 'std')
| -rw-r--r-- | std/common.cup | 8 |
1 files changed, 8 insertions, 0 deletions
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 |