tools/nolibc/unistd: add syscall()
authorThomas Weißschuh <linux@weissschuh.net>
Sat, 20 May 2023 07:58:57 +0000 (09:58 +0200)
committerPaul E. McKenney <paulmck@kernel.org>
Fri, 9 Jun 2023 18:46:07 +0000 (11:46 -0700)
commit53fcfafa8c5c848d4ef1712053f6ea23b263a0de
treec5042791da95744d20aab9866faac3ba883e4bfe
parentc22c7c81af4d061e484e0833fbc3418d0f3008d4
tools/nolibc/unistd: add syscall()

syscall() is used by "normal" libcs to allow users to directly call
syscalls.
By having the same syntax inside nolibc users can more easily write code
that works with different libcs.

The macro logic is adapted from systemtaps STAP_PROBEV() macro that is
released in the public domain / CC0.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/include/nolibc/unistd.h
tools/testing/selftests/nolibc/nolibc-test.c