hare

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

commit b79fbfe2b1d4dae5befc177f5d9e5b32d4061677
parent 9d4cd6b0cdcf898445dd52b250b7cda2dd8f0167
Author: Alexey Yerin <yyp@disroot.org>
Date:   Thu, 16 Feb 2023 23:12:24 +0300

rt: add shmat syscall

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

Diffstat:
Mrt/+freebsd/syscalls.ha | 5+++++
Mrt/+linux/syscalls.ha | 5+++++
2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/rt/+freebsd/syscalls.ha b/rt/+freebsd/syscalls.ha @@ -513,3 +513,8 @@ export fn posix_fallocate(fd: int, off: i64, ln: i64) (void | errno) = { wrap_return(syscall3(SYS_posix_fallocate, fd: u64, off: u64, ln: u64))?; }; + +export fn shmat(id: int, addr: *const void, flag: int) *void = { + return syscall3(SYS_shmat, id: u64, addr: uintptr: u64, + flag: u64): uintptr: *void; +}; diff --git a/rt/+linux/syscalls.ha b/rt/+linux/syscalls.ha @@ -915,3 +915,8 @@ export type inotify_event = struct { length: u32, name: *const char }; + +export fn shmat(id: int, addr: *const void, flag: int) *void = { + return syscall3(SYS_shmat, id: u64, addr: uintptr: u64, + flag: u64): uintptr: *void; +};