From 55f1d6a9d6780e779e882a4d2d1b3db311835798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= Date: Mon, 23 Feb 2026 22:40:14 +0100 Subject: tools/nolibc: rename my_syscallX() to __nolibc_syscallX() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The naming convention of the my_syscallX() macros is a bit unfortunate. They may conflict with application code and the name is very generic. Switch to __nolibc_syscallX(). The leading underscores place the symbols in the implementation-defined namespace, avoiding conflicting names. It is also clearer that these are non-standard extensions from nolibc. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://patch.msgid.link/20260223-nolibc-namespacing-v1-1-52574ffebb2c@weissschuh.net --- tools/include/nolibc/sys/wait.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/include/nolibc/sys/wait.h') diff --git a/tools/include/nolibc/sys/wait.h b/tools/include/nolibc/sys/wait.h index 9d9319ba92cb..bc11100e7f82 100644 --- a/tools/include/nolibc/sys/wait.h +++ b/tools/include/nolibc/sys/wait.h @@ -23,7 +23,7 @@ static __attribute__((unused)) int sys_waitid(int which, pid_t pid, siginfo_t *infop, int options, struct rusage *rusage) { - return my_syscall5(__NR_waitid, which, pid, infop, options, rusage); + return __nolibc_syscall5(__NR_waitid, which, pid, infop, options, rusage); } static __attribute__((unused)) -- cgit v1.2.3 From 6285f0881ec68034399d13552f7243e69e6e37bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= Date: Thu, 19 Mar 2026 17:20:17 +0100 Subject: tools/nolibc: rename sys_foo() functions to _sys_foo() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sys_foo() naming scheme used by the syscall wrappers may collide with application symbols. Especially as 'sys_' is an obvious naming scheme an application may choose for its own custom systemcall wrappers. Avoid these conflicts by using an leading underscore which moves the names into the implementation's namespace. This naming scheme was chosen over a '__nolibc_' prefix, as these functions are not an implementation detail but a documented interface meant to be used by applications. While this may break some existing users, adapting them should be straightforward. Given that nolibc is most-likely vendored, no unexpected breakage should happen. No in-tree users are affected. These conflicts happen when compiling some of the kernel selftests with nolibc. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://patch.msgid.link/20260319-nolibc-namespacing-v1-1-33c22eaddb5e@weissschuh.net --- tools/include/nolibc/sys/wait.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/include/nolibc/sys/wait.h') diff --git a/tools/include/nolibc/sys/wait.h b/tools/include/nolibc/sys/wait.h index bc11100e7f82..7a1feb2b66fc 100644 --- a/tools/include/nolibc/sys/wait.h +++ b/tools/include/nolibc/sys/wait.h @@ -21,7 +21,7 @@ */ static __attribute__((unused)) -int sys_waitid(int which, pid_t pid, siginfo_t *infop, int options, struct rusage *rusage) +int _sys_waitid(int which, pid_t pid, siginfo_t *infop, int options, struct rusage *rusage) { return __nolibc_syscall5(__NR_waitid, which, pid, infop, options, rusage); } @@ -29,7 +29,7 @@ int sys_waitid(int which, pid_t pid, siginfo_t *infop, int options, struct rusag static __attribute__((unused)) int waitid(int which, pid_t pid, siginfo_t *infop, int options) { - return __sysret(sys_waitid(which, pid, infop, options, NULL)); + return __sysret(_sys_waitid(which, pid, infop, options, NULL)); } -- cgit v1.2.3