summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2026-04-05 12:06:24 +0300
committerThomas Weißschuh <linux@weissschuh.net>2026-04-07 10:27:02 +0300
commit022bbb5a41fd6463887dfb7de22f5be8262239a7 (patch)
treec9bf487dae0abe243dc862a255029877f88aad4d /tools
parent3f5059f01de1aca30e7f793da0a0b5bf2740cb7a (diff)
downloadlinux-022bbb5a41fd6463887dfb7de22f5be8262239a7.tar.xz
tools/nolibc: move the call to __sysret() into syscall()
__sysret() transforms the return value from the kernel into the libc return value convention. There is no reason for it to be called in the middle of the internals of the syscall() implementation macros. Move the call up, directly into syscall(), to make the code simpler. 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-2-e5b12bc63211@weissschuh.net
Diffstat (limited to 'tools')
-rw-r--r--tools/include/nolibc/sys/syscall.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/include/nolibc/sys/syscall.h b/tools/include/nolibc/sys/syscall.h
index b673f3d0c0f8..3f43fac3d7b8 100644
--- a/tools/include/nolibc/sys/syscall.h
+++ b/tools/include/nolibc/sys/syscall.h
@@ -12,8 +12,8 @@
#define ___nolibc_syscall_narg(_0, _1, _2, _3, _4, _5, _6, N, ...) N
#define __nolibc_syscall_narg(...) ___nolibc_syscall_narg(__VA_ARGS__, 6, 5, 4, 3, 2, 1, 0)
-#define __nolibc_syscall(N, ...) __sysret(__nolibc_syscall##N(__VA_ARGS__))
+#define __nolibc_syscall(N, ...) __nolibc_syscall##N(__VA_ARGS__)
#define __nolibc_syscall_n(N, ...) __nolibc_syscall(N, __VA_ARGS__)
-#define syscall(...) __nolibc_syscall_n(__nolibc_syscall_narg(__VA_ARGS__), ##__VA_ARGS__)
+#define syscall(...) __sysret(__nolibc_syscall_n(__nolibc_syscall_narg(__VA_ARGS__), ##__VA_ARGS__))
#endif /* _NOLIBC_SYS_SYSCALL_H */