hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 679d5ac9427f951b708931151068a2ad3c743ba4
parent b0806f691c23c502c662c147f62fad1773815825
Author: Alexey Yerin <yyp@disroot.org>
Date:   Sun,  5 Mar 2023 13:11:40 +0300

rt: add mremap

Signed-off-by: Alexey Yerin <yyp@disroot.org>

Diffstat:
Mrt/+linux/syscalls.ha | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/rt/+linux/syscalls.ha b/rt/+linux/syscalls.ha @@ -314,6 +314,18 @@ export fn mmap( }; }; +export fn mremap( + old_addr: *void, + old_len: size, + new_len: size, + flags: uint, + new_addr: nullable *void, +) (*void | errno) = { + let r = syscall5(SYS_mremap, old_addr: uintptr: u64, old_len: u64, + new_len: u64, flags: u64, new_addr: uintptr: u64); + return wrap_return(r)?: uintptr: *void; +}; + export fn munmap(addr: *void, length: size) (void | errno) = { wrap_return(syscall2(SYS_munmap, addr: uintptr: u64, length: u64))?;