linux/tools/include/nolibc/sys
Thomas Weißschuh 2eb64b936d tools/nolibc: add the _syscall() macro
The standard syscall() function or macro uses the libc return value
convention. Errors returned from the kernel as negative values are
stored in errno and -1 is returned. Users who want to avoid using
errno don't have a way to call raw syscalls and check the returned
error.

Add a new macro _syscall() which works like the standard syscall()
but passes through the return value from the kernel unchanged.
The naming scheme and return values match the named _sys_foo()
system call wrappers already part of nolibc.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://patch.msgid.link/20260405-nolibc-syscall-v1-3-e5b12bc63211@weissschuh.net
2026-04-07 09:27:07 +02:00
..
auxv.h tools/nolibc: add option to disable runtime 2025-10-29 16:29:16 +01:00
ioctl.h tools/nolibc: rename sys_foo() functions to _sys_foo() 2026-03-22 11:03:59 +01:00
mman.h tools/nolibc: rename sys_foo() functions to _sys_foo() 2026-03-22 11:03:59 +01:00
mount.h tools/nolibc: rename sys_foo() functions to _sys_foo() 2026-03-22 11:03:59 +01:00
prctl.h tools/nolibc: rename sys_foo() functions to _sys_foo() 2026-03-22 11:03:59 +01:00
ptrace.h tools/nolibc: rename sys_foo() functions to _sys_foo() 2026-03-22 11:03:59 +01:00
random.h tools/nolibc: rename sys_foo() functions to _sys_foo() 2026-03-22 11:03:59 +01:00
reboot.h tools/nolibc: rename sys_foo() functions to _sys_foo() 2026-03-22 11:03:59 +01:00
resource.h tools/nolibc: rename sys_foo() functions to _sys_foo() 2026-03-22 11:03:59 +01:00
select.h tools/nolibc: rename sys_foo() functions to _sys_foo() 2026-03-22 11:03:59 +01:00
stat.h tools/nolibc: use makedev() in fstatat() 2026-04-04 10:29:07 +02:00
syscall.h tools/nolibc: add the _syscall() macro 2026-04-07 09:27:07 +02:00
sysmacros.h tools/nolibc: handle all major and minor numbers in makedev() and friends 2026-04-04 10:29:02 +02:00
time.h tools/nolibc: rename sys_foo() functions to _sys_foo() 2026-03-22 11:03:59 +01:00
timerfd.h tools/nolibc: rename sys_foo() functions to _sys_foo() 2026-03-22 11:03:59 +01:00
types.h tools/nolibc: add sys/types.h shim 2025-04-19 14:22:29 +02:00
uio.h tools/nolibc: rename sys_foo() functions to _sys_foo() 2026-03-22 11:03:59 +01:00
utsname.h tools/nolibc: rename sys_foo() functions to _sys_foo() 2026-03-22 11:03:59 +01:00
wait.h tools/nolibc: rename sys_foo() functions to _sys_foo() 2026-03-22 11:03:59 +01:00