mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] tools/nolibc: add the _syscall() macro
@ 2026-04-05  9:06 Thomas Weißschuh
  2026-04-05  9:06 ` [PATCH 1/3] tools/nolibc: rename the internal macros used in syscall() Thomas Weißschuh
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Thomas Weißschuh @ 2026-04-05  9:06 UTC (permalink / raw)
  To: Willy Tarreau; +Cc: linux-kernel, Thomas Weißschuh

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 which 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.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Thomas Weißschuh (3):
      tools/nolibc: rename the internal macros used in syscall()
      tools/nolibc: move the call to __sysret() into syscall()
      tools/nolibc: add the _syscall() macro

 tools/include/nolibc/sys/syscall.h           | 11 ++++++-----
 tools/testing/selftests/nolibc/nolibc-test.c |  4 ++++
 2 files changed, 10 insertions(+), 5 deletions(-)
---
base-commit: bda9721dd49b6a2a60feee606e22f50975063ab3
change-id: 20260405-nolibc-syscall-53e8b9b7f7cc

Best regards,
--  
Thomas Weißschuh <linux@weissschuh.net>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-04-07  7:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-05  9:06 [PATCH 0/3] tools/nolibc: add the _syscall() macro Thomas Weißschuh
2026-04-05  9:06 ` [PATCH 1/3] tools/nolibc: rename the internal macros used in syscall() Thomas Weißschuh
2026-04-05  9:06 ` [PATCH 2/3] tools/nolibc: move the call to __sysret() into syscall() Thomas Weißschuh
2026-04-05  9:06 ` [PATCH 3/3] tools/nolibc: add the _syscall() macro Thomas Weißschuh
2026-04-07  7:17 ` [PATCH 0/3] " Willy Tarreau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®