]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tools/nolibc: rename my_syscallX() to __nolibc_syscallX()
authorThomas Weißschuh <linux@weissschuh.net>
Mon, 23 Feb 2026 21:40:14 +0000 (22:40 +0100)
committerThomas Weißschuh <linux@weissschuh.net>
Wed, 25 Feb 2026 07:21:17 +0000 (08:21 +0100)
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 <linux@weissschuh.net>
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://patch.msgid.link/20260223-nolibc-namespacing-v1-1-52574ffebb2c@weissschuh.net
34 files changed:
tools/include/nolibc/arch-arm.h
tools/include/nolibc/arch-arm64.h
tools/include/nolibc/arch-loongarch.h
tools/include/nolibc/arch-m68k.h
tools/include/nolibc/arch-mips.h
tools/include/nolibc/arch-powerpc.h
tools/include/nolibc/arch-riscv.h
tools/include/nolibc/arch-s390.h
tools/include/nolibc/arch-sh.h
tools/include/nolibc/arch-sparc.h
tools/include/nolibc/arch-x86.h
tools/include/nolibc/fcntl.h
tools/include/nolibc/nolibc.h
tools/include/nolibc/poll.h
tools/include/nolibc/sched.h
tools/include/nolibc/stackprotector.h
tools/include/nolibc/sys.h
tools/include/nolibc/sys/ioctl.h
tools/include/nolibc/sys/mman.h
tools/include/nolibc/sys/mount.h
tools/include/nolibc/sys/prctl.h
tools/include/nolibc/sys/ptrace.h
tools/include/nolibc/sys/random.h
tools/include/nolibc/sys/reboot.h
tools/include/nolibc/sys/resource.h
tools/include/nolibc/sys/select.h
tools/include/nolibc/sys/stat.h
tools/include/nolibc/sys/syscall.h
tools/include/nolibc/sys/timerfd.h
tools/include/nolibc/sys/uio.h
tools/include/nolibc/sys/utsname.h
tools/include/nolibc/sys/wait.h
tools/include/nolibc/time.h
tools/include/nolibc/unistd.h

index 251c4257902820f0e76f066ef570d5b2eae69a54..a4d3a777a051bae42a0c9597e665b9423ca3c448 100644 (file)
@@ -50,7 +50,7 @@
 
 #endif /* end THUMB */
 
-#define my_syscall0(num)                                                      \
+#define __nolibc_syscall0(num)                                                \
 ({                                                                            \
        register long _num  __asm__(_NOLIBC_SYSCALL_REG) = (num);             \
        register long _arg1 __asm__ ("r0");                                   \
@@ -67,7 +67,7 @@
        _arg1;                                                                \
 })
 
-#define my_syscall1(num, arg1)                                                \
+#define __nolibc_syscall1(num, arg1)                                          \
 ({                                                                            \
        register long _num  __asm__(_NOLIBC_SYSCALL_REG) = (num);             \
        register long _arg1 __asm__ ("r0") = (long)(arg1);                    \
@@ -84,7 +84,7 @@
        _arg1;                                                                \
 })
 
-#define my_syscall2(num, arg1, arg2)                                          \
+#define __nolibc_syscall2(num, arg1, arg2)                                    \
 ({                                                                            \
        register long _num  __asm__(_NOLIBC_SYSCALL_REG) = (num);             \
        register long _arg1 __asm__ ("r0") = (long)(arg1);                    \
        _arg1;                                                                \
 })
 
-#define my_syscall3(num, arg1, arg2, arg3)                                    \
+#define __nolibc_syscall3(num, arg1, arg2, arg3)                              \
 ({                                                                            \
        register long _num  __asm__(_NOLIBC_SYSCALL_REG) = (num);             \
        register long _arg1 __asm__ ("r0") = (long)(arg1);                    \
        _arg1;                                                                \
 })
 
-#define my_syscall4(num, arg1, arg2, arg3, arg4)                              \
+#define __nolibc_syscall4(num, arg1, arg2, arg3, arg4)                        \
 ({                                                                            \
        register long _num  __asm__(_NOLIBC_SYSCALL_REG) = (num);             \
        register long _arg1 __asm__ ("r0") = (long)(arg1);                    \
        _arg1;                                                                \
 })
 
-#define my_syscall5(num, arg1, arg2, arg3, arg4, arg5)                        \
+#define __nolibc_syscall5(num, arg1, arg2, arg3, arg4, arg5)                  \
 ({                                                                            \
        register long _num  __asm__(_NOLIBC_SYSCALL_REG) = (num);             \
        register long _arg1 __asm__ ("r0") = (long)(arg1);                    \
        _arg1;                                                                \
 })
 
-#define my_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)                  \
+#define __nolibc_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)            \
 ({                                                                            \
        register long _num  __asm__(_NOLIBC_SYSCALL_REG) = (num);             \
        register long _arg1 __asm__ ("r0") = (long)(arg1);                    \
index 080a55a7144eece01c5da4f39a82cd5ee8ab0b78..28b3c7536ad6d349f3bb99f3434761968cba9e24 100644 (file)
@@ -22,7 +22,7 @@
  *     don't have to experience issues with register constraints.
  */
 
-#define my_syscall0(num)                                                      \
+#define __nolibc_syscall0(num)                                                \
 ({                                                                            \
        register long _num  __asm__ ("x8") = (num);                           \
        register long _arg1 __asm__ ("x0");                                   \
@@ -36,7 +36,7 @@
        _arg1;                                                                \
 })
 
-#define my_syscall1(num, arg1)                                                \
+#define __nolibc_syscall1(num, arg1)                                          \
 ({                                                                            \
        register long _num  __asm__ ("x8") = (num);                           \
        register long _arg1 __asm__ ("x0") = (long)(arg1);                    \
@@ -51,7 +51,7 @@
        _arg1;                                                                \
 })
 
-#define my_syscall2(num, arg1, arg2)                                          \
+#define __nolibc_syscall2(num, arg1, arg2)                                    \
 ({                                                                            \
        register long _num  __asm__ ("x8") = (num);                           \
        register long _arg1 __asm__ ("x0") = (long)(arg1);                    \
@@ -67,7 +67,7 @@
        _arg1;                                                                \
 })
 
-#define my_syscall3(num, arg1, arg2, arg3)                                    \
+#define __nolibc_syscall3(num, arg1, arg2, arg3)                              \
 ({                                                                            \
        register long _num  __asm__ ("x8") = (num);                           \
        register long _arg1 __asm__ ("x0") = (long)(arg1);                    \
@@ -84,7 +84,7 @@
        _arg1;                                                                \
 })
 
-#define my_syscall4(num, arg1, arg2, arg3, arg4)                              \
+#define __nolibc_syscall4(num, arg1, arg2, arg3, arg4)                        \
 ({                                                                            \
        register long _num  __asm__ ("x8") = (num);                           \
        register long _arg1 __asm__ ("x0") = (long)(arg1);                    \
        _arg1;                                                                \
 })
 
-#define my_syscall5(num, arg1, arg2, arg3, arg4, arg5)                        \
+#define __nolibc_syscall5(num, arg1, arg2, arg3, arg4, arg5)                  \
 ({                                                                            \
        register long _num  __asm__ ("x8") = (num);                           \
        register long _arg1 __asm__ ("x0") = (long)(arg1);                    \
        _arg1;                                                                \
 })
 
-#define my_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)                  \
+#define __nolibc_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)            \
 ({                                                                            \
        register long _num  __asm__ ("x8") = (num);                           \
        register long _arg1 __asm__ ("x0") = (long)(arg1);                    \
index c894176c3f89a47f852d053a86883d260d433383..86fb34bbf1857ec360a09ceae467a830ffc3604b 100644 (file)
@@ -24,7 +24,7 @@
 #define _NOLIBC_SYSCALL_CLOBBERLIST \
        "memory", "$t0", "$t1", "$t2", "$t3", "$t4", "$t5", "$t6", "$t7", "$t8"
 
-#define my_syscall0(num)                                                      \
+#define __nolibc_syscall0(num)                                                \
 ({                                                                            \
        register long _num  __asm__ ("a7") = (num);                           \
        register long _arg1 __asm__ ("a0");                                   \
@@ -38,7 +38,7 @@
        _arg1;                                                                \
 })
 
-#define my_syscall1(num, arg1)                                                \
+#define __nolibc_syscall1(num, arg1)                                          \
 ({                                                                            \
        register long _num  __asm__ ("a7") = (num);                           \
        register long _arg1 __asm__ ("a0") = (long)(arg1);                    \
@@ -52,7 +52,7 @@
        _arg1;                                                                \
 })
 
-#define my_syscall2(num, arg1, arg2)                                          \
+#define __nolibc_syscall2(num, arg1, arg2)                                    \
 ({                                                                            \
        register long _num  __asm__ ("a7") = (num);                           \
        register long _arg1 __asm__ ("a0") = (long)(arg1);                    \
@@ -68,7 +68,7 @@
        _arg1;                                                                \
 })
 
-#define my_syscall3(num, arg1, arg2, arg3)                                    \
+#define __nolibc_syscall3(num, arg1, arg2, arg3)                              \
 ({                                                                            \
        register long _num  __asm__ ("a7") = (num);                           \
        register long _arg1 __asm__ ("a0") = (long)(arg1);                    \
@@ -85,7 +85,7 @@
        _arg1;                                                                \
 })
 
-#define my_syscall4(num, arg1, arg2, arg3, arg4)                              \
+#define __nolibc_syscall4(num, arg1, arg2, arg3, arg4)                        \
 ({                                                                            \
        register long _num  __asm__ ("a7") = (num);                           \
        register long _arg1 __asm__ ("a0") = (long)(arg1);                    \
        _arg1;                                                                \
 })
 
-#define my_syscall5(num, arg1, arg2, arg3, arg4, arg5)                        \
+#define __nolibc_syscall5(num, arg1, arg2, arg3, arg4, arg5)                  \
 ({                                                                            \
        register long _num  __asm__ ("a7") = (num);                           \
        register long _arg1 __asm__ ("a0") = (long)(arg1);                    \
        _arg1;                                                                \
 })
 
-#define my_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)                  \
+#define __nolibc_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)            \
 ({                                                                            \
        register long _num  __asm__ ("a7") = (num);                           \
        register long _arg1 __asm__ ("a0") = (long)(arg1);                    \
index 2a4fbada5e79cd88fb0d782e9bffe9eaba3c5213..81d34c219a42139c1a1c4a2fffa1ed7565a254d5 100644 (file)
@@ -15,7 +15,7 @@
 
 #define _NOLIBC_SYSCALL_CLOBBERLIST "memory"
 
-#define my_syscall0(num)                                                      \
+#define __nolibc_syscall0(num)                                                \
 ({                                                                            \
        register long _num __asm__ ("d0") = (num);                            \
                                                                              \
@@ -28,7 +28,7 @@
        _num;                                                                 \
 })
 
-#define my_syscall1(num, arg1)                                                \
+#define __nolibc_syscall1(num, arg1)                                          \
 ({                                                                            \
        register long _num __asm__ ("d0") = (num);                            \
        register long _arg1 __asm__ ("d1") = (long)(arg1);                    \
@@ -42,7 +42,7 @@
        _num;                                                                 \
 })
 
-#define my_syscall2(num, arg1, arg2)                                          \
+#define __nolibc_syscall2(num, arg1, arg2)                                    \
 ({                                                                            \
        register long _num __asm__ ("d0") = (num);                            \
        register long _arg1 __asm__ ("d1") = (long)(arg1);                    \
@@ -57,7 +57,7 @@
        _num;                                                                 \
 })
 
-#define my_syscall3(num, arg1, arg2, arg3)                                    \
+#define __nolibc_syscall3(num, arg1, arg2, arg3)                              \
 ({                                                                            \
        register long _num __asm__ ("d0")  = (num);                           \
        register long _arg1 __asm__ ("d1") = (long)(arg1);                    \
@@ -73,7 +73,7 @@
        _num;                                                                 \
 })
 
-#define my_syscall4(num, arg1, arg2, arg3, arg4)                              \
+#define __nolibc_syscall4(num, arg1, arg2, arg3, arg4)                        \
 ({                                                                            \
        register long _num __asm__ ("d0") = (num);                            \
        register long _arg1 __asm__ ("d1") = (long)(arg1);                    \
@@ -90,7 +90,7 @@
        _num;                                                                 \
 })
 
-#define my_syscall5(num, arg1, arg2, arg3, arg4, arg5)                        \
+#define __nolibc_syscall5(num, arg1, arg2, arg3, arg4, arg5)                  \
 ({                                                                            \
        register long _num __asm__ ("d0") = (num);                            \
        register long _arg1 __asm__ ("d1") = (long)(arg1);                    \
        _num;                                                                 \
 })
 
-#define my_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)                  \
+#define __nolibc_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)            \
 ({                                                                            \
        register long _num __asm__ ("d0")  = (num);                           \
        register long _arg1 __asm__ ("d1") = (long)(arg1);                    \
index a72506ceec6bd33a0a8e07568b7fecfb47b1fe8d..bd4a9b57e1f021dbf5bf7104f039bf3d67a739c3 100644 (file)
@@ -59,7 +59,7 @@
 
 #endif /* _ABIO32 */
 
-#define my_syscall0(num)                                                      \
+#define __nolibc_syscall0(num)                                                \
 ({                                                                            \
        register long _num __asm__ ("v0") = (num);                            \
        register long _arg4 __asm__ ("a3");                                   \
@@ -75,7 +75,7 @@
        _arg4 ? -_num : _num;                                                 \
 })
 
-#define my_syscall1(num, arg1)                                                \
+#define __nolibc_syscall1(num, arg1)                                          \
 ({                                                                            \
        register long _num __asm__ ("v0") = (num);                            \
        register long _arg1 __asm__ ("a0") = (long)(arg1);                    \
@@ -93,7 +93,7 @@
        _arg4 ? -_num : _num;                                                 \
 })
 
-#define my_syscall2(num, arg1, arg2)                                          \
+#define __nolibc_syscall2(num, arg1, arg2)                                    \
 ({                                                                            \
        register long _num __asm__ ("v0") = (num);                            \
        register long _arg1 __asm__ ("a0") = (long)(arg1);                    \
        _arg4 ? -_num : _num;                                                 \
 })
 
-#define my_syscall3(num, arg1, arg2, arg3)                                    \
+#define __nolibc_syscall3(num, arg1, arg2, arg3)                              \
 ({                                                                            \
        register long _num __asm__ ("v0")  = (num);                           \
        register long _arg1 __asm__ ("a0") = (long)(arg1);                    \
        _arg4 ? -_num : _num;                                                 \
 })
 
-#define my_syscall4(num, arg1, arg2, arg3, arg4)                              \
+#define __nolibc_syscall4(num, arg1, arg2, arg3, arg4)                        \
 ({                                                                            \
        register long _num __asm__ ("v0") = (num);                            \
        register long _arg1 __asm__ ("a0") = (long)(arg1);                    \
 
 #if defined(_ABIO32)
 
-#define my_syscall5(num, arg1, arg2, arg3, arg4, arg5)                        \
+#define __nolibc_syscall5(num, arg1, arg2, arg3, arg4, arg5)                  \
 ({                                                                            \
        register long _num __asm__ ("v0") = (num);                            \
        register long _arg1 __asm__ ("a0") = (long)(arg1);                    \
        _arg4 ? -_num : _num;                                                 \
 })
 
-#define my_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)                  \
+#define __nolibc_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)            \
 ({                                                                            \
        register long _num __asm__ ("v0")  = (num);                           \
        register long _arg1 __asm__ ("a0") = (long)(arg1);                    \
 
 #else /* _ABIN32 || _ABI64 */
 
-#define my_syscall5(num, arg1, arg2, arg3, arg4, arg5)                        \
+#define __nolibc_syscall5(num, arg1, arg2, arg3, arg4, arg5)                  \
 ({                                                                            \
        register long _num __asm__ ("v0") = (num);                            \
        register long _arg1 __asm__ ("$4") = (long)(arg1);                    \
        _arg4 ? -_num : _num;                                                 \
 })
 
-#define my_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)                  \
+#define __nolibc_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)            \
 ({                                                                            \
        register long _num __asm__ ("v0")  = (num);                           \
        register long _arg1 __asm__ ("$4") = (long)(arg1);                    \
index e0c7e0b81f7cd35086f4f8f0ff34c3e00487e991..ef878868aa4ad565c494ce437dc463ca8159d339 100644 (file)
@@ -25,7 +25,7 @@
 #define _NOLIBC_SYSCALL_CLOBBERLIST \
        "memory", "cr0", "r12", "r11", "r10", "r9"
 
-#define my_syscall0(num)                                                     \
+#define __nolibc_syscall0(num)                                               \
 ({                                                                           \
        register long _ret  __asm__ ("r3");                                  \
        register long _num  __asm__ ("r0") = (num);                          \
@@ -42,7 +42,7 @@
        _ret;                                                                \
 })
 
-#define my_syscall1(num, arg1)                                               \
+#define __nolibc_syscall1(num, arg1)                                         \
 ({                                                                           \
        register long _ret  __asm__ ("r3");                                  \
        register long _num  __asm__ ("r0") = (num);                          \
@@ -61,7 +61,7 @@
 })
 
 
-#define my_syscall2(num, arg1, arg2)                                         \
+#define __nolibc_syscall2(num, arg1, arg2)                                   \
 ({                                                                           \
        register long _ret  __asm__ ("r3");                                  \
        register long _num  __asm__ ("r0") = (num);                          \
@@ -81,7 +81,7 @@
 })
 
 
-#define my_syscall3(num, arg1, arg2, arg3)                                   \
+#define __nolibc_syscall3(num, arg1, arg2, arg3)                             \
 ({                                                                           \
        register long _ret  __asm__ ("r3");                                  \
        register long _num  __asm__ ("r0") = (num);                          \
 })
 
 
-#define my_syscall4(num, arg1, arg2, arg3, arg4)                             \
+#define __nolibc_syscall4(num, arg1, arg2, arg3, arg4)                       \
 ({                                                                           \
        register long _ret  __asm__ ("r3");                                  \
        register long _num  __asm__ ("r0") = (num);                          \
 })
 
 
-#define my_syscall5(num, arg1, arg2, arg3, arg4, arg5)                       \
+#define __nolibc_syscall5(num, arg1, arg2, arg3, arg4, arg5)                 \
 ({                                                                           \
        register long _ret  __asm__ ("r3");                                  \
        register long _num  __asm__ ("r0") = (num);                          \
        _ret;                                                                \
 })
 
-#define my_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)                 \
+#define __nolibc_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)           \
 ({                                                                           \
        register long _ret  __asm__ ("r3");                                  \
        register long _num  __asm__ ("r0") = (num);                          \
index 1c00cacf57e15f57d30e4649c09bd8ddd2636e4c..386ebb9f5b087bd6bcc263ead961eec7c3e4549a 100644 (file)
@@ -21,7 +21,7 @@
  *     so that we don't have to experience issues with register constraints.
  */
 
-#define my_syscall0(num)                                                      \
+#define __nolibc_syscall0(num)                                                \
 ({                                                                            \
        register long _num  __asm__ ("a7") = (num);                           \
        register long _arg1 __asm__ ("a0");                                   \
@@ -35,7 +35,7 @@
        _arg1;                                                                \
 })
 
-#define my_syscall1(num, arg1)                                                \
+#define __nolibc_syscall1(num, arg1)                                          \
 ({                                                                            \
        register long _num  __asm__ ("a7") = (num);                           \
        register long _arg1 __asm__ ("a0") = (long)(arg1);                    \
@@ -49,7 +49,7 @@
        _arg1;                                                                \
 })
 
-#define my_syscall2(num, arg1, arg2)                                          \
+#define __nolibc_syscall2(num, arg1, arg2)                                    \
 ({                                                                            \
        register long _num  __asm__ ("a7") = (num);                           \
        register long _arg1 __asm__ ("a0") = (long)(arg1);                    \
@@ -65,7 +65,7 @@
        _arg1;                                                                \
 })
 
-#define my_syscall3(num, arg1, arg2, arg3)                                    \
+#define __nolibc_syscall3(num, arg1, arg2, arg3)                              \
 ({                                                                            \
        register long _num  __asm__ ("a7") = (num);                           \
        register long _arg1 __asm__ ("a0") = (long)(arg1);                    \
@@ -82,7 +82,7 @@
        _arg1;                                                                \
 })
 
-#define my_syscall4(num, arg1, arg2, arg3, arg4)                              \
+#define __nolibc_syscall4(num, arg1, arg2, arg3, arg4)                        \
 ({                                                                            \
        register long _num  __asm__ ("a7") = (num);                           \
        register long _arg1 __asm__ ("a0") = (long)(arg1);                    \
        _arg1;                                                                \
 })
 
-#define my_syscall5(num, arg1, arg2, arg3, arg4, arg5)                        \
+#define __nolibc_syscall5(num, arg1, arg2, arg3, arg4, arg5)                  \
 ({                                                                            \
        register long _num  __asm__ ("a7") = (num);                           \
        register long _arg1 __asm__ ("a0") = (long)(arg1);                    \
        _arg1;                                                                \
 })
 
-#define my_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)                  \
+#define __nolibc_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)            \
 ({                                                                            \
        register long _num  __asm__ ("a7") = (num);                           \
        register long _arg1 __asm__ ("a0") = (long)(arg1);                    \
index 904281e95f9996bce5d4de50889a9fe27274bf59..d301b636e083efed0d735d4ac343ef2900e062b7 100644 (file)
@@ -28,7 +28,7 @@
  *
  */
 
-#define my_syscall0(num)                                               \
+#define __nolibc_syscall0(num)                                         \
 ({                                                                     \
        register long _num __asm__ ("1") = (num);                       \
        register long _rc __asm__ ("2");                                \
@@ -42,7 +42,7 @@
        _rc;                                                            \
 })
 
-#define my_syscall1(num, arg1)                                         \
+#define __nolibc_syscall1(num, arg1)                                   \
 ({                                                                     \
        register long _num __asm__ ("1") = (num);                       \
        register long _arg1 __asm__ ("2") = (long)(arg1);               \
@@ -56,7 +56,7 @@
        _arg1;                                                          \
 })
 
-#define my_syscall2(num, arg1, arg2)                                   \
+#define __nolibc_syscall2(num, arg1, arg2)                             \
 ({                                                                     \
        register long _num __asm__ ("1") = (num);                       \
        register long _arg1 __asm__ ("2") = (long)(arg1);               \
@@ -71,7 +71,7 @@
        _arg1;                                                          \
 })
 
-#define my_syscall3(num, arg1, arg2, arg3)                             \
+#define __nolibc_syscall3(num, arg1, arg2, arg3)                       \
 ({                                                                     \
        register long _num __asm__ ("1") = (num);                       \
        register long _arg1 __asm__ ("2") = (long)(arg1);               \
@@ -87,7 +87,7 @@
        _arg1;                                                          \
 })
 
-#define my_syscall4(num, arg1, arg2, arg3, arg4)                       \
+#define __nolibc_syscall4(num, arg1, arg2, arg3, arg4)                 \
 ({                                                                     \
        register long _num __asm__ ("1") = (num);                       \
        register long _arg1 __asm__ ("2") = (long)(arg1);               \
        _arg1;                                                          \
 })
 
-#define my_syscall5(num, arg1, arg2, arg3, arg4, arg5)                 \
+#define __nolibc_syscall5(num, arg1, arg2, arg3, arg4, arg5)           \
 ({                                                                     \
        register long _num __asm__ ("1") = (num);                       \
        register long _arg1 __asm__ ("2") = (long)(arg1);               \
        _arg1;                                                          \
 })
 
-#define my_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)           \
+#define __nolibc_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)     \
 ({                                                                     \
        register long _num __asm__ ("1") = (num);                       \
        register long _arg1 __asm__ ("2") = (long)(arg1);               \
@@ -179,21 +179,21 @@ void *sys_mmap(void *addr, size_t length, int prot, int flags, int fd,
                .offset = (unsigned long)offset
        };
 
-       return (void *)my_syscall1(__NR_mmap, &args);
+       return (void *)__nolibc_syscall1(__NR_mmap, &args);
 }
 #define sys_mmap sys_mmap
 
 static __attribute__((unused))
 pid_t sys_fork(void)
 {
-       return my_syscall5(__NR_clone, 0, SIGCHLD, 0, 0, 0);
+       return __nolibc_syscall5(__NR_clone, 0, SIGCHLD, 0, 0, 0);
 }
 #define sys_fork sys_fork
 
 static __attribute__((unused))
 pid_t sys_vfork(void)
 {
-       return my_syscall5(__NR_clone, 0, CLONE_VM | CLONE_VFORK | SIGCHLD, 0, 0, 0);
+       return __nolibc_syscall5(__NR_clone, 0, CLONE_VM | CLONE_VFORK | SIGCHLD, 0, 0, 0);
 }
 #define sys_vfork sys_vfork
 
index 7a421197d104d3dad8859d05b67deb9cbb24e51e..b5a64ceeec97414cbc8106b97fac3e96c6e3911d 100644 (file)
@@ -19,7 +19,7 @@
  *   - syscall return value is in r0
  */
 
-#define my_syscall0(num)                                                      \
+#define __nolibc_syscall0(num)                                                \
 ({                                                                            \
        register long _num __asm__ ("r3") = (num);                            \
        register long _ret __asm__ ("r0");                                    \
@@ -33,7 +33,7 @@
        _ret;                                                                 \
 })
 
-#define my_syscall1(num, arg1)                                                \
+#define __nolibc_syscall1(num, arg1)                                          \
 ({                                                                            \
        register long _num __asm__ ("r3") = (num);                            \
        register long _ret __asm__ ("r0");                                    \
@@ -48,7 +48,7 @@
        _ret;                                                                 \
 })
 
-#define my_syscall2(num, arg1, arg2)                                          \
+#define __nolibc_syscall2(num, arg1, arg2)                                    \
 ({                                                                            \
        register long _num __asm__ ("r3") = (num);                            \
        register long _ret __asm__ ("r0");                                    \
@@ -64,7 +64,7 @@
        _ret;                                                                 \
 })
 
-#define my_syscall3(num, arg1, arg2, arg3)                                    \
+#define __nolibc_syscall3(num, arg1, arg2, arg3)                              \
 ({                                                                            \
        register long _num __asm__ ("r3") = (num);                            \
        register long _ret __asm__ ("r0");                                    \
@@ -81,7 +81,7 @@
        _ret;                                                                 \
 })
 
-#define my_syscall4(num, arg1, arg2, arg3, arg4)                              \
+#define __nolibc_syscall4(num, arg1, arg2, arg3, arg4)                        \
 ({                                                                            \
        register long _num __asm__ ("r3") = (num);                            \
        register long _ret __asm__ ("r0");                                    \
@@ -99,7 +99,7 @@
        _ret;                                                                 \
 })
 
-#define my_syscall5(num, arg1, arg2, arg3, arg4, arg5)                        \
+#define __nolibc_syscall5(num, arg1, arg2, arg3, arg4, arg5)                  \
 ({                                                                            \
        register long _num __asm__ ("r3") = (num);                            \
        register long _ret __asm__ ("r0");                                    \
        _ret;                                                                 \
 })
 
-#define my_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)                  \
+#define __nolibc_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)            \
 ({                                                                            \
        register long _num __asm__ ("r3") = (num);                            \
        register long _ret __asm__ ("r0");                                    \
index 2ebb5686e10538c317cfb9f61ab39b446df34960..02aca6579cb226ad2b36237caa0cdf08f1eae596 100644 (file)
@@ -38,7 +38,7 @@
 
 #endif /* __arch64__ */
 
-#define my_syscall0(num)                                                      \
+#define __nolibc_syscall0(num)                                                \
 ({                                                                            \
        register long _num  __asm__ ("g1") = (num);                           \
        register long _arg1 __asm__ ("o0");                                   \
@@ -52,7 +52,7 @@
        _arg1;                                                                \
 })
 
-#define my_syscall1(num, arg1)                                                \
+#define __nolibc_syscall1(num, arg1)                                          \
 ({                                                                            \
        register long _num  __asm__ ("g1") = (num);                           \
        register long _arg1 __asm__ ("o0") = (long)(arg1);                    \
@@ -66,7 +66,7 @@
        _arg1;                                                                \
 })
 
-#define my_syscall2(num, arg1, arg2)                                          \
+#define __nolibc_syscall2(num, arg1, arg2)                                    \
 ({                                                                            \
        register long _num  __asm__ ("g1") = (num);                           \
        register long _arg1 __asm__ ("o0") = (long)(arg1);                    \
@@ -81,7 +81,7 @@
        _arg1;                                                                \
 })
 
-#define my_syscall3(num, arg1, arg2, arg3)                                    \
+#define __nolibc_syscall3(num, arg1, arg2, arg3)                              \
 ({                                                                            \
        register long _num  __asm__ ("g1") = (num);                           \
        register long _arg1 __asm__ ("o0") = (long)(arg1);                    \
@@ -97,7 +97,7 @@
        _arg1;                                                                \
 })
 
-#define my_syscall4(num, arg1, arg2, arg3, arg4)                              \
+#define __nolibc_syscall4(num, arg1, arg2, arg3, arg4)                        \
 ({                                                                            \
        register long _num  __asm__ ("g1") = (num);                           \
        register long _arg1 __asm__ ("o0") = (long)(arg1);                    \
        _arg1;                                                                \
 })
 
-#define my_syscall5(num, arg1, arg2, arg3, arg4, arg5)                        \
+#define __nolibc_syscall5(num, arg1, arg2, arg3, arg4, arg5)                  \
 ({                                                                            \
        register long _num  __asm__ ("g1") = (num);                           \
        register long _arg1 __asm__ ("o0") = (long)(arg1);                    \
        _arg1;                                                                \
 })
 
-#define my_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)                  \
+#define __nolibc_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)            \
 ({                                                                            \
        register long _num  __asm__ ("g1") = (num);                           \
        register long _arg1 __asm__ ("o0") = (long)(arg1);                    \
@@ -180,7 +180,7 @@ pid_t sys_fork(void)
        pid_t parent, ret;
 
        parent = getpid();
-       ret = my_syscall0(__NR_fork);
+       ret = __nolibc_syscall0(__NR_fork);
 
        /* The syscall returns the parent pid in the child instead of 0 */
        if (ret == parent)
@@ -196,7 +196,7 @@ pid_t sys_vfork(void)
        pid_t parent, ret;
 
        parent = getpid();
-       ret = my_syscall0(__NR_vfork);
+       ret = __nolibc_syscall0(__NR_vfork);
 
        /* The syscall returns the parent pid in the child instead of 0 */
        if (ret == parent)
index f6c43ac5377bb21cc71726faa3f9e397c59a973a..769ba01a8629ff4d7f2a3896617c7aabafecdec6 100644 (file)
@@ -30,7 +30,7 @@
  */
 #define __ARCH_WANT_SYS_OLD_SELECT
 
-#define my_syscall0(num)                                                      \
+#define __nolibc_syscall0(num)                                                \
 ({                                                                            \
        long _ret;                                                            \
        register long _num __asm__ ("eax") = (num);                           \
@@ -44,7 +44,7 @@
        _ret;                                                                 \
 })
 
-#define my_syscall1(num, arg1)                                                \
+#define __nolibc_syscall1(num, arg1)                                          \
 ({                                                                            \
        long _ret;                                                            \
        register long _num __asm__ ("eax") = (num);                           \
@@ -60,7 +60,7 @@
        _ret;                                                                 \
 })
 
-#define my_syscall2(num, arg1, arg2)                                          \
+#define __nolibc_syscall2(num, arg1, arg2)                                    \
 ({                                                                            \
        long _ret;                                                            \
        register long _num __asm__ ("eax") = (num);                           \
@@ -77,7 +77,7 @@
        _ret;                                                                 \
 })
 
-#define my_syscall3(num, arg1, arg2, arg3)                                    \
+#define __nolibc_syscall3(num, arg1, arg2, arg3)                              \
 ({                                                                            \
        long _ret;                                                            \
        register long _num __asm__ ("eax") = (num);                           \
@@ -95,7 +95,7 @@
        _ret;                                                                 \
 })
 
-#define my_syscall4(num, arg1, arg2, arg3, arg4)                              \
+#define __nolibc_syscall4(num, arg1, arg2, arg3, arg4)                        \
 ({                                                                            \
        long _ret;                                                            \
        register long _num __asm__ ("eax") = (num);                           \
        _ret;                                                                 \
 })
 
-#define my_syscall5(num, arg1, arg2, arg3, arg4, arg5)                        \
+#define __nolibc_syscall5(num, arg1, arg2, arg3, arg4, arg5)                  \
 ({                                                                            \
        long _ret;                                                            \
        register long _num __asm__ ("eax") = (num);                           \
        _ret;                                                                 \
 })
 
-#define my_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)   \
-({                                                             \
-       long _eax  = (long)(num);                               \
-       long _arg6 = (long)(arg6); /* Always in memory */       \
-       __asm__ volatile (                                      \
-               "pushl  %[_arg6]\n\t"                           \
-               "pushl  %%ebp\n\t"                              \
-               "movl   4(%%esp),%%ebp\n\t"                     \
-               "int    $0x80\n\t"                              \
-               "popl   %%ebp\n\t"                              \
-               "addl   $4,%%esp\n\t"                           \
-               : "+a"(_eax)            /* %eax */              \
-               : "b"(arg1),            /* %ebx */              \
-                 "c"(arg2),            /* %ecx */              \
-                 "d"(arg3),            /* %edx */              \
-                 "S"(arg4),            /* %esi */              \
-                 "D"(arg5),            /* %edi */              \
-                 [_arg6]"m"(_arg6)     /* memory */            \
-               : "memory", "cc"                                \
-       );                                                      \
-       _eax;                                                   \
+#define __nolibc_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)           \
+({                                                                           \
+       long _eax  = (long)(num);                                             \
+       long _arg6 = (long)(arg6); /* Always in memory */                     \
+       __asm__ volatile (                                                    \
+               "pushl  %[_arg6]\n\t"                                         \
+               "pushl  %%ebp\n\t"                                            \
+               "movl   4(%%esp),%%ebp\n\t"                                   \
+               "int    $0x80\n\t"                                            \
+               "popl   %%ebp\n\t"                                            \
+               "addl   $4,%%esp\n\t"                                         \
+               : "+a"(_eax)            /* %eax */                            \
+               : "b"(arg1),            /* %ebx */                            \
+                 "c"(arg2),            /* %ecx */                            \
+                 "d"(arg3),            /* %edx */                            \
+                 "S"(arg4),            /* %esi */                            \
+                 "D"(arg5),            /* %edi */                            \
+                 [_arg6]"m"(_arg6)     /* memory */                          \
+               : "memory", "cc"                                              \
+       );                                                                    \
+       _eax;                                                                 \
 })
 
 #ifndef NOLIBC_NO_RUNTIME
@@ -200,7 +200,7 @@ void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _s
  *
  */
 
-#define my_syscall0(num)                                                      \
+#define __nolibc_syscall0(num)                                                \
 ({                                                                            \
        long _ret;                                                            \
        register long _num  __asm__ ("rax") = (num);                          \
@@ -214,7 +214,7 @@ void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _s
        _ret;                                                                 \
 })
 
-#define my_syscall1(num, arg1)                                                \
+#define __nolibc_syscall1(num, arg1)                                          \
 ({                                                                            \
        long _ret;                                                            \
        register long _num  __asm__ ("rax") = (num);                          \
@@ -230,7 +230,7 @@ void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _s
        _ret;                                                                 \
 })
 
-#define my_syscall2(num, arg1, arg2)                                          \
+#define __nolibc_syscall2(num, arg1, arg2)                                    \
 ({                                                                            \
        long _ret;                                                            \
        register long _num  __asm__ ("rax") = (num);                          \
@@ -247,7 +247,7 @@ void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _s
        _ret;                                                                 \
 })
 
-#define my_syscall3(num, arg1, arg2, arg3)                                    \
+#define __nolibc_syscall3(num, arg1, arg2, arg3)                              \
 ({                                                                            \
        long _ret;                                                            \
        register long _num  __asm__ ("rax") = (num);                          \
@@ -265,7 +265,7 @@ void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _s
        _ret;                                                                 \
 })
 
-#define my_syscall4(num, arg1, arg2, arg3, arg4)                              \
+#define __nolibc_syscall4(num, arg1, arg2, arg3, arg4)                        \
 ({                                                                            \
        long _ret;                                                            \
        register long _num  __asm__ ("rax") = (num);                          \
@@ -284,7 +284,7 @@ void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _s
        _ret;                                                                 \
 })
 
-#define my_syscall5(num, arg1, arg2, arg3, arg4, arg5)                        \
+#define __nolibc_syscall5(num, arg1, arg2, arg3, arg4, arg5)                  \
 ({                                                                            \
        long _ret;                                                            \
        register long _num  __asm__ ("rax") = (num);                          \
@@ -304,7 +304,7 @@ void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _s
        _ret;                                                                 \
 })
 
-#define my_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)                  \
+#define __nolibc_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6)            \
 ({                                                                            \
        long _ret;                                                            \
        register long _num  __asm__ ("rax") = (num);                          \
index bff2e542f20f9dbee34b88a51b08ba2dfcf26464..8d82768dea9d448ffd8203e6d8ae865707567195 100644 (file)
@@ -21,7 +21,7 @@
 static __attribute__((unused))
 int sys_openat(int dirfd, const char *path, int flags, mode_t mode)
 {
-       return my_syscall4(__NR_openat, dirfd, path, flags, mode);
+       return __nolibc_syscall4(__NR_openat, dirfd, path, flags, mode);
 }
 
 static __attribute__((unused))
@@ -47,7 +47,7 @@ int openat(int dirfd, const char *path, int flags, ...)
 static __attribute__((unused))
 int sys_open(const char *path, int flags, mode_t mode)
 {
-       return my_syscall4(__NR_openat, AT_FDCWD, path, flags, mode);
+       return __nolibc_syscall4(__NR_openat, AT_FDCWD, path, flags, mode);
 }
 
 static __attribute__((unused))
index 9c7f43b9218b3c0bd357795e702f2af2e4d36211..d1d08b7f859952fdf6a1ad76ead94ae9f56f755a 100644 (file)
  *
  * Syscalls are split into 3 levels:
  *   - The lower level is the arch-specific syscall() definition, consisting in
- *     assembly code in compound expressions. These are called my_syscall0() to
- *     my_syscall6() depending on the number of arguments. All input arguments
+ *     assembly code in compound expressions. These are called __nolibc_syscall0() to
+ *     __nolibc_syscall6() depending on the number of arguments. All input arguments
  *     are castto a long stored in a register. These expressions always return
  *     the syscall's return value as a signed long value which is often either
  *     a pointer or the negated errno value.
  *
  *   - The second level is mostly architecture-independent. It is made of
- *     static functions called sys_<name>() which rely on my_syscallN()
+ *     static functions called sys_<name>() which rely on __nolibc_syscallN()
  *     depending on the syscall definition. These functions are responsible
  *     for exposing the appropriate types for the syscall arguments (int,
  *     pointers, etc) and for setting the appropriate return type (often int).
index e854c94647b1eea6c5ab14a8cbe9e206303b2eb8..ea5a6d08c43cb41fa49897fd5a8274bd7c17ff05 100644 (file)
@@ -30,7 +30,7 @@ int sys_poll(struct pollfd *fds, int nfds, int timeout)
                t.tv_sec  = timeout / 1000;
                t.tv_nsec = (timeout % 1000) * 1000000;
        }
-       return my_syscall5(__NR_ppoll_time64, fds, nfds, (timeout >= 0) ? &t : NULL, NULL, 0);
+       return __nolibc_syscall5(__NR_ppoll_time64, fds, nfds, (timeout >= 0) ? &t : NULL, NULL, 0);
 #else
        struct __kernel_old_timespec t;
 
@@ -38,7 +38,7 @@ int sys_poll(struct pollfd *fds, int nfds, int timeout)
                t.tv_sec  = timeout / 1000;
                t.tv_nsec = (timeout % 1000) * 1000000;
        }
-       return my_syscall5(__NR_ppoll, fds, nfds, (timeout >= 0) ? &t : NULL, NULL, 0);
+       return __nolibc_syscall5(__NR_ppoll, fds, nfds, (timeout >= 0) ? &t : NULL, NULL, 0);
 #endif
 }
 
index 32221562c1663f6d1d78fab82bb6e8d05ad68da9..b1af7fa6672db68fef1a54511f36119178d82ff1 100644 (file)
@@ -21,7 +21,7 @@
 static __attribute__((unused))
 int sys_setns(int fd, int nstype)
 {
-       return my_syscall2(__NR_setns, fd, nstype);
+       return __nolibc_syscall2(__NR_setns, fd, nstype);
 }
 
 static __attribute__((unused))
@@ -38,7 +38,7 @@ int setns(int fd, int nstype)
 static __attribute__((unused))
 int sys_unshare(int flags)
 {
-       return my_syscall1(__NR_unshare, flags);
+       return __nolibc_syscall1(__NR_unshare, flags);
 }
 
 static __attribute__((unused))
index 7123aa056cb09c7013ee1ae5bac3e98a5d17c021..ae8b1d3a374dcdb20b48ad0d9379eb98d50c87b4 100644 (file)
@@ -24,9 +24,9 @@ __attribute__((weak,used,noreturn,section(".text.nolibc_stack_chk")))
 void __stack_chk_fail(void)
 {
        pid_t pid;
-       my_syscall3(__NR_write, STDERR_FILENO, "!!Stack smashing detected!!\n", 28);
-       pid = my_syscall0(__NR_getpid);
-       my_syscall2(__NR_kill, pid, SIGABRT);
+       __nolibc_syscall3(__NR_write, STDERR_FILENO, "!!Stack smashing detected!!\n", 28);
+       pid = __nolibc_syscall0(__NR_getpid);
+       __nolibc_syscall2(__NR_kill, pid, SIGABRT);
        for (;;);
 }
 
@@ -42,7 +42,7 @@ uintptr_t __stack_chk_guard;
 
 static __no_stack_protector void __stack_chk_init(void)
 {
-       my_syscall3(__NR_getrandom, &__stack_chk_guard, sizeof(__stack_chk_guard), 0);
+       __nolibc_syscall3(__NR_getrandom, &__stack_chk_guard, sizeof(__stack_chk_guard), 0);
        /* a bit more randomness in case getrandom() fails, ensure the guard is never 0 */
        if (__stack_chk_guard != (uintptr_t) &__stack_chk_guard)
                __stack_chk_guard ^= (uintptr_t) &__stack_chk_guard;
index 403ee9ce8389d5e24e9c8b662cadefa47e6fa68f..bc1c76cb2f63e101bf1d8eea433a4ed0934cea51 100644 (file)
@@ -87,7 +87,7 @@ static __inline__ int __nolibc_enosys(const char *syscall, ...)
 static __attribute__((unused))
 void *sys_brk(void *addr)
 {
-       return (void *)my_syscall1(__NR_brk, addr);
+       return (void *)__nolibc_syscall1(__NR_brk, addr);
 }
 
 static __attribute__((unused))
@@ -124,7 +124,7 @@ void *sbrk(intptr_t inc)
 static __attribute__((unused))
 int sys_chdir(const char *path)
 {
-       return my_syscall1(__NR_chdir, path);
+       return __nolibc_syscall1(__NR_chdir, path);
 }
 
 static __attribute__((unused))
@@ -136,7 +136,7 @@ int chdir(const char *path)
 static __attribute__((unused))
 int sys_fchdir(int fildes)
 {
-       return my_syscall1(__NR_fchdir, fildes);
+       return __nolibc_syscall1(__NR_fchdir, fildes);
 }
 
 static __attribute__((unused))
@@ -154,9 +154,9 @@ static __attribute__((unused))
 int sys_chmod(const char *path, mode_t mode)
 {
 #if defined(__NR_fchmodat)
-       return my_syscall4(__NR_fchmodat, AT_FDCWD, path, mode, 0);
+       return __nolibc_syscall4(__NR_fchmodat, AT_FDCWD, path, mode, 0);
 #else
-       return my_syscall2(__NR_chmod, path, mode);
+       return __nolibc_syscall2(__NR_chmod, path, mode);
 #endif
 }
 
@@ -175,9 +175,9 @@ static __attribute__((unused))
 int sys_chown(const char *path, uid_t owner, gid_t group)
 {
 #if defined(__NR_fchownat)
-       return my_syscall5(__NR_fchownat, AT_FDCWD, path, owner, group, 0);
+       return __nolibc_syscall5(__NR_fchownat, AT_FDCWD, path, owner, group, 0);
 #else
-       return my_syscall3(__NR_chown, path, owner, group);
+       return __nolibc_syscall3(__NR_chown, path, owner, group);
 #endif
 }
 
@@ -195,7 +195,7 @@ int chown(const char *path, uid_t owner, gid_t group)
 static __attribute__((unused))
 int sys_chroot(const char *path)
 {
-       return my_syscall1(__NR_chroot, path);
+       return __nolibc_syscall1(__NR_chroot, path);
 }
 
 static __attribute__((unused))
@@ -212,7 +212,7 @@ int chroot(const char *path)
 static __attribute__((unused))
 int sys_close(int fd)
 {
-       return my_syscall1(__NR_close, fd);
+       return __nolibc_syscall1(__NR_close, fd);
 }
 
 static __attribute__((unused))
@@ -229,7 +229,7 @@ int close(int fd)
 static __attribute__((unused))
 int sys_dup(int fd)
 {
-       return my_syscall1(__NR_dup, fd);
+       return __nolibc_syscall1(__NR_dup, fd);
 }
 
 static __attribute__((unused))
@@ -256,13 +256,13 @@ int sys_dup2(int old, int new)
 #endif
 
        if (old == new) {
-               ret = my_syscall2(nr_fcntl, old, F_GETFD);
+               ret = __nolibc_syscall2(nr_fcntl, old, F_GETFD);
                return ret < 0 ? ret : old;
        }
 
-       return my_syscall3(__NR_dup3, old, new, 0);
+       return __nolibc_syscall3(__NR_dup3, old, new, 0);
 #else
-       return my_syscall2(__NR_dup2, old, new);
+       return __nolibc_syscall2(__NR_dup2, old, new);
 #endif
 }
 
@@ -281,7 +281,7 @@ int dup2(int old, int new)
 static __attribute__((unused))
 int sys_dup3(int old, int new, int flags)
 {
-       return my_syscall3(__NR_dup3, old, new, flags);
+       return __nolibc_syscall3(__NR_dup3, old, new, flags);
 }
 
 static __attribute__((unused))
@@ -299,7 +299,7 @@ int dup3(int old, int new, int flags)
 static __attribute__((unused))
 int sys_execve(const char *filename, char *const argv[], char *const envp[])
 {
-       return my_syscall3(__NR_execve, filename, argv, envp);
+       return __nolibc_syscall3(__NR_execve, filename, argv, envp);
 }
 
 static __attribute__((unused))
@@ -316,7 +316,7 @@ int execve(const char *filename, char *const argv[], char *const envp[])
 static __attribute__((noreturn,unused))
 void sys_exit(int status)
 {
-       my_syscall1(__NR_exit, status & 255);
+       __nolibc_syscall1(__NR_exit, status & 255);
        while(1); /* shut the "noreturn" warnings. */
 }
 
@@ -346,9 +346,9 @@ pid_t sys_fork(void)
         * have a different API, but most archs have the flags on first arg and
         * will not use the rest with no other flag.
         */
-       return my_syscall5(__NR_clone, SIGCHLD, 0, 0, 0, 0);
+       return __nolibc_syscall5(__NR_clone, SIGCHLD, 0, 0, 0, 0);
 #else
-       return my_syscall0(__NR_fork);
+       return __nolibc_syscall0(__NR_fork);
 #endif
 }
 #endif
@@ -365,9 +365,9 @@ pid_t sys_vfork(void)
 {
 #if defined(__NR_clone)
        /* See the note in sys_fork(). */
-       return my_syscall5(__NR_clone, CLONE_VM | CLONE_VFORK | SIGCHLD, 0, 0, 0, 0);
+       return __nolibc_syscall5(__NR_clone, CLONE_VM | CLONE_VFORK | SIGCHLD, 0, 0, 0, 0);
 #elif defined(__NR_vfork)
-       return my_syscall0(__NR_vfork);
+       return __nolibc_syscall0(__NR_vfork);
 #endif
 }
 #endif
@@ -385,7 +385,7 @@ pid_t vfork(void)
 static __attribute__((unused))
 int sys_fsync(int fd)
 {
-       return my_syscall1(__NR_fsync, fd);
+       return __nolibc_syscall1(__NR_fsync, fd);
 }
 
 static __attribute__((unused))
@@ -402,7 +402,7 @@ int fsync(int fd)
 static __attribute__((unused))
 int sys_getdents64(int fd, struct linux_dirent64 *dirp, int count)
 {
-       return my_syscall3(__NR_getdents64, fd, dirp, count);
+       return __nolibc_syscall3(__NR_getdents64, fd, dirp, count);
 }
 
 static __attribute__((unused))
@@ -420,9 +420,9 @@ static __attribute__((unused))
 uid_t sys_geteuid(void)
 {
 #if defined(__NR_geteuid32)
-       return my_syscall0(__NR_geteuid32);
+       return __nolibc_syscall0(__NR_geteuid32);
 #else
-       return my_syscall0(__NR_geteuid);
+       return __nolibc_syscall0(__NR_geteuid);
 #endif
 }
 
@@ -440,7 +440,7 @@ uid_t geteuid(void)
 static __attribute__((unused))
 pid_t sys_getpgid(pid_t pid)
 {
-       return my_syscall1(__NR_getpgid, pid);
+       return __nolibc_syscall1(__NR_getpgid, pid);
 }
 
 static __attribute__((unused))
@@ -474,7 +474,7 @@ pid_t getpgrp(void)
 static __attribute__((unused))
 pid_t sys_getpid(void)
 {
-       return my_syscall0(__NR_getpid);
+       return __nolibc_syscall0(__NR_getpid);
 }
 
 static __attribute__((unused))
@@ -491,7 +491,7 @@ pid_t getpid(void)
 static __attribute__((unused))
 pid_t sys_getppid(void)
 {
-       return my_syscall0(__NR_getppid);
+       return __nolibc_syscall0(__NR_getppid);
 }
 
 static __attribute__((unused))
@@ -508,7 +508,7 @@ pid_t getppid(void)
 static __attribute__((unused))
 pid_t sys_gettid(void)
 {
-       return my_syscall0(__NR_gettid);
+       return __nolibc_syscall0(__NR_gettid);
 }
 
 static __attribute__((unused))
@@ -539,9 +539,9 @@ static __attribute__((unused))
 uid_t sys_getuid(void)
 {
 #if defined(__NR_getuid32)
-       return my_syscall0(__NR_getuid32);
+       return __nolibc_syscall0(__NR_getuid32);
 #else
-       return my_syscall0(__NR_getuid);
+       return __nolibc_syscall0(__NR_getuid);
 #endif
 }
 
@@ -559,7 +559,7 @@ uid_t getuid(void)
 static __attribute__((unused))
 int sys_kill(pid_t pid, int signal)
 {
-       return my_syscall2(__NR_kill, pid, signal);
+       return __nolibc_syscall2(__NR_kill, pid, signal);
 }
 
 static __attribute__((unused))
@@ -577,9 +577,9 @@ static __attribute__((unused))
 int sys_link(const char *old, const char *new)
 {
 #if defined(__NR_linkat)
-       return my_syscall5(__NR_linkat, AT_FDCWD, old, AT_FDCWD, new, 0);
+       return __nolibc_syscall5(__NR_linkat, AT_FDCWD, old, AT_FDCWD, new, 0);
 #else
-       return my_syscall2(__NR_link, old, new);
+       return __nolibc_syscall2(__NR_link, old, new);
 #endif
 }
 
@@ -602,7 +602,7 @@ off_t sys_lseek(int fd, off_t offset, int whence)
        off_t result;
        int ret;
 
-       ret = my_syscall5(__NR_llseek, fd, offset >> 32, (uint32_t)offset, &loff, whence);
+       ret = __nolibc_syscall5(__NR_llseek, fd, offset >> 32, (uint32_t)offset, &loff, whence);
        if (ret < 0)
                result = ret;
        else
@@ -610,7 +610,7 @@ off_t sys_lseek(int fd, off_t offset, int whence)
 
        return result;
 #else
-       return my_syscall3(__NR_lseek, fd, offset, whence);
+       return __nolibc_syscall3(__NR_lseek, fd, offset, whence);
 #endif
 }
 
@@ -629,9 +629,9 @@ static __attribute__((unused))
 int sys_mkdir(const char *path, mode_t mode)
 {
 #if defined(__NR_mkdirat)
-       return my_syscall3(__NR_mkdirat, AT_FDCWD, path, mode);
+       return __nolibc_syscall3(__NR_mkdirat, AT_FDCWD, path, mode);
 #else
-       return my_syscall2(__NR_mkdir, path, mode);
+       return __nolibc_syscall2(__NR_mkdir, path, mode);
 #endif
 }
 
@@ -649,9 +649,9 @@ static __attribute__((unused))
 int sys_rmdir(const char *path)
 {
 #if defined(__NR_rmdir)
-       return my_syscall1(__NR_rmdir, path);
+       return __nolibc_syscall1(__NR_rmdir, path);
 #else
-       return my_syscall3(__NR_unlinkat, AT_FDCWD, path, AT_REMOVEDIR);
+       return __nolibc_syscall3(__NR_unlinkat, AT_FDCWD, path, AT_REMOVEDIR);
 #endif
 }
 
@@ -670,9 +670,9 @@ static __attribute__((unused))
 long sys_mknod(const char *path, mode_t mode, dev_t dev)
 {
 #if defined(__NR_mknodat)
-       return my_syscall4(__NR_mknodat, AT_FDCWD, path, mode, dev);
+       return __nolibc_syscall4(__NR_mknodat, AT_FDCWD, path, mode, dev);
 #else
-       return my_syscall3(__NR_mknod, path, mode, dev);
+       return __nolibc_syscall3(__NR_mknod, path, mode, dev);
 #endif
 }
 
@@ -691,7 +691,7 @@ int mknod(const char *path, mode_t mode, dev_t dev)
 static __attribute__((unused))
 int sys_pipe2(int pipefd[2], int flags)
 {
-       return my_syscall2(__NR_pipe2, pipefd, flags);
+       return __nolibc_syscall2(__NR_pipe2, pipefd, flags);
 }
 
 static __attribute__((unused))
@@ -714,7 +714,7 @@ int pipe(int pipefd[2])
 static __attribute__((unused))
 int sys_pivot_root(const char *new, const char *old)
 {
-       return my_syscall2(__NR_pivot_root, new, old);
+       return __nolibc_syscall2(__NR_pivot_root, new, old);
 }
 
 static __attribute__((unused))
@@ -731,7 +731,7 @@ int pivot_root(const char *new, const char *old)
 static __attribute__((unused))
 ssize_t sys_read(int fd, void *buf, size_t count)
 {
-       return my_syscall3(__NR_read, fd, buf, count);
+       return __nolibc_syscall3(__NR_read, fd, buf, count);
 }
 
 static __attribute__((unused))
@@ -748,7 +748,7 @@ ssize_t read(int fd, void *buf, size_t count)
 static __attribute__((unused))
 int sys_sched_yield(void)
 {
-       return my_syscall0(__NR_sched_yield);
+       return __nolibc_syscall0(__NR_sched_yield);
 }
 
 static __attribute__((unused))
@@ -765,7 +765,7 @@ int sched_yield(void)
 static __attribute__((unused))
 int sys_setpgid(pid_t pid, pid_t pgid)
 {
-       return my_syscall2(__NR_setpgid, pid, pgid);
+       return __nolibc_syscall2(__NR_setpgid, pid, pgid);
 }
 
 static __attribute__((unused))
@@ -792,7 +792,7 @@ pid_t setpgrp(void)
 static __attribute__((unused))
 pid_t sys_setsid(void)
 {
-       return my_syscall0(__NR_setsid);
+       return __nolibc_syscall0(__NR_setsid);
 }
 
 static __attribute__((unused))
@@ -810,9 +810,9 @@ static __attribute__((unused))
 int sys_symlink(const char *old, const char *new)
 {
 #if defined(__NR_symlinkat)
-       return my_syscall3(__NR_symlinkat, old, AT_FDCWD, new);
+       return __nolibc_syscall3(__NR_symlinkat, old, AT_FDCWD, new);
 #else
-       return my_syscall2(__NR_symlink, old, new);
+       return __nolibc_syscall2(__NR_symlink, old, new);
 #endif
 }
 
@@ -830,7 +830,7 @@ int symlink(const char *old, const char *new)
 static __attribute__((unused))
 mode_t sys_umask(mode_t mode)
 {
-       return my_syscall1(__NR_umask, mode);
+       return __nolibc_syscall1(__NR_umask, mode);
 }
 
 static __attribute__((unused))
@@ -847,7 +847,7 @@ mode_t umask(mode_t mode)
 static __attribute__((unused))
 int sys_umount2(const char *path, int flags)
 {
-       return my_syscall2(__NR_umount2, path, flags);
+       return __nolibc_syscall2(__NR_umount2, path, flags);
 }
 
 static __attribute__((unused))
@@ -865,9 +865,9 @@ static __attribute__((unused))
 int sys_unlink(const char *path)
 {
 #if defined(__NR_unlinkat)
-       return my_syscall3(__NR_unlinkat, AT_FDCWD, path, 0);
+       return __nolibc_syscall3(__NR_unlinkat, AT_FDCWD, path, 0);
 #else
-       return my_syscall1(__NR_unlink, path);
+       return __nolibc_syscall1(__NR_unlink, path);
 #endif
 }
 
@@ -885,7 +885,7 @@ int unlink(const char *path)
 static __attribute__((unused))
 ssize_t sys_write(int fd, const void *buf, size_t count)
 {
-       return my_syscall3(__NR_write, fd, buf, count);
+       return __nolibc_syscall3(__NR_write, fd, buf, count);
 }
 
 static __attribute__((unused))
@@ -902,7 +902,7 @@ ssize_t write(int fd, const void *buf, size_t count)
 static __attribute__((unused))
 int sys_memfd_create(const char *name, unsigned int flags)
 {
-       return my_syscall2(__NR_memfd_create, name, flags);
+       return __nolibc_syscall2(__NR_memfd_create, name, flags);
 }
 
 static __attribute__((unused))
index fc880687e02af609fd430944f9dc47e8cef28c8d..289cc1494f2c376f04b647f459345815518f948d 100644 (file)
@@ -21,7 +21,7 @@
 static __attribute__((unused))
 long sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
-       return my_syscall3(__NR_ioctl, fd, cmd, arg);
+       return __nolibc_syscall3(__NR_ioctl, fd, cmd, arg);
 }
 
 #define ioctl(fd, cmd, arg) __sysret(sys_ioctl(fd, cmd, (unsigned long)(arg)))
index 77084ac3405a03db11813e27bc876f6e046c7f11..5679fdda0a872d3bafacd4ee9ec1f08ed839d911 100644 (file)
@@ -27,7 +27,7 @@ void *sys_mmap(void *addr, size_t length, int prot, int flags, int fd,
        n = __NR_mmap;
 #endif
 
-       return (void *)my_syscall6(n, addr, length, prot, flags, fd, offset);
+       return (void *)__nolibc_syscall6(n, addr, length, prot, flags, fd, offset);
 }
 #endif
 
@@ -46,8 +46,8 @@ void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset)
 static __attribute__((unused))
 void *sys_mremap(void *old_address, size_t old_size, size_t new_size, int flags, void *new_address)
 {
-       return (void *)my_syscall5(__NR_mremap, old_address, old_size,
-                                  new_size, flags, new_address);
+       return (void *)__nolibc_syscall5(__NR_mremap, old_address, old_size,
+                                        new_size, flags, new_address);
 }
 
 static __attribute__((unused))
@@ -65,7 +65,7 @@ void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, voi
 static __attribute__((unused))
 int sys_munmap(void *addr, size_t length)
 {
-       return my_syscall2(__NR_munmap, addr, length);
+       return __nolibc_syscall2(__NR_munmap, addr, length);
 }
 
 static __attribute__((unused))
index e39ec02ea24c00c34c22c70d618d6e19bfaa96a1..1f8d14da276f9c173eaf124bf6566f21c27ada5d 100644 (file)
@@ -23,7 +23,7 @@ static __attribute__((unused))
 int sys_mount(const char *src, const char *tgt, const char *fst,
              unsigned long flags, const void *data)
 {
-       return my_syscall5(__NR_mount, src, tgt, fst, flags, data);
+       return __nolibc_syscall5(__NR_mount, src, tgt, fst, flags, data);
 }
 
 static __attribute__((unused))
index 0205907b6ac832418d0aa8b1a33efe37ed29d190..b019b46183289f3694d8e7a76c62ca4ddbb3a87c 100644 (file)
@@ -23,7 +23,7 @@ static __attribute__((unused))
 int sys_prctl(int option, unsigned long arg2, unsigned long arg3,
                          unsigned long arg4, unsigned long arg5)
 {
-       return my_syscall5(__NR_prctl, option, arg2, arg3, arg4, arg5);
+       return __nolibc_syscall5(__NR_prctl, option, arg2, arg3, arg4, arg5);
 }
 
 static __attribute__((unused))
index 72ca285416335bd73e34b6c96a9db4260565a92e..6cde77e93ceb6f699a8ef585c85d4d7c28d255a1 100644 (file)
@@ -21,7 +21,7 @@
 static __attribute__((unused))
 long sys_ptrace(int op, pid_t pid, void *addr, void *data)
 {
-       return my_syscall4(__NR_ptrace, op, pid, addr, data);
+       return __nolibc_syscall4(__NR_ptrace, op, pid, addr, data);
 }
 
 static __attribute__((unused))
index cd5d25c571a8b7bb443fdb42c675f8a31cf2fee5..af9a270fc29d5663e39045a7099b19f695adeabf 100644 (file)
@@ -22,7 +22,7 @@
 static __attribute__((unused))
 ssize_t sys_getrandom(void *buf, size_t buflen, unsigned int flags)
 {
-       return my_syscall3(__NR_getrandom, buf, buflen, flags);
+       return __nolibc_syscall3(__NR_getrandom, buf, buflen, flags);
 }
 
 static __attribute__((unused))
index 38274c64a7228c7dc648f89952d17523e138e420..20431025ccc69f0ddb864709e208a5311446487b 100644 (file)
@@ -22,7 +22,7 @@
 static __attribute__((unused))
 ssize_t sys_reboot(int magic1, int magic2, int cmd, void *arg)
 {
-       return my_syscall4(__NR_reboot, magic1, magic2, cmd, arg);
+       return __nolibc_syscall4(__NR_reboot, magic1, magic2, cmd, arg);
 }
 
 static __attribute__((unused))
index b990f914dc561430f406c4118d631c618f16b1b8..ff3c65f5fade056bc53965b1740bb38beabc9b75 100644 (file)
@@ -23,7 +23,7 @@ static __attribute__((unused))
 int sys_prlimit64(pid_t pid, int resource,
                  const struct rlimit64 *new_limit, struct rlimit64 *old_limit)
 {
-       return my_syscall4(__NR_prlimit64, pid, resource, new_limit, old_limit);
+       return __nolibc_syscall4(__NR_prlimit64, pid, resource, new_limit, old_limit);
 }
 
 static __attribute__((unused))
index 80cb3755ba1884cc262e0c17da1926f36603040b..fcbcf4d0f8d10aac6c2099fbd52e9dce584983c1 100644 (file)
@@ -70,7 +70,8 @@ int sys_select(int nfds, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeva
                t.tv_sec  = timeout->tv_sec;
                t.tv_nsec = (uint32_t)timeout->tv_usec * 1000;
        }
-       return my_syscall6(__NR_pselect6_time64, nfds, rfds, wfds, efds, timeout ? &t : NULL, NULL);
+       return __nolibc_syscall6(__NR_pselect6_time64, nfds, rfds, wfds, efds,
+                                timeout ? &t : NULL, NULL);
 #else
        struct __kernel_old_timespec t;
 
@@ -78,7 +79,8 @@ int sys_select(int nfds, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeva
                t.tv_sec  = timeout->tv_sec;
                t.tv_nsec = (uint32_t)timeout->tv_usec * 1000;
        }
-       return my_syscall6(__NR_pselect6, nfds, rfds, wfds, efds, timeout ? &t : NULL, NULL);
+       return __nolibc_syscall6(__NR_pselect6, nfds, rfds, wfds, efds,
+                                timeout ? &t : NULL, NULL);
 #endif
 }
 
index 8b4d80e3ea0360e3e6280f6c6166e87f793ddee4..2777217793db7b1ede61c1b32b64ba658ada26ee 100644 (file)
@@ -26,7 +26,7 @@ static __attribute__((unused))
 int sys_statx(int fd, const char *path, int flags, unsigned int mask, struct statx *buf)
 {
 #ifdef __NR_statx
-       return my_syscall5(__NR_statx, fd, path, flags, mask, buf);
+       return __nolibc_syscall5(__NR_statx, fd, path, flags, mask, buf);
 #else
        return __nolibc_enosys(__func__, fd, path, flags, mask, buf);
 #endif
index 4bf97f1386a03d6db33ebf1f8de116ba72a5e608..8cbcae4a32aaeb3ade2386cc7f9fd31f5f37b5cd 100644 (file)
@@ -12,7 +12,7 @@
 
 #define __syscall_narg(_0, _1, _2, _3, _4, _5, _6, N, ...) N
 #define _syscall_narg(...) __syscall_narg(__VA_ARGS__, 6, 5, 4, 3, 2, 1, 0)
-#define _syscall(N, ...) __sysret(my_syscall##N(__VA_ARGS__))
+#define _syscall(N, ...) __sysret(__nolibc_syscall##N(__VA_ARGS__))
 #define _syscall_n(N, ...) _syscall(N, __VA_ARGS__)
 #define syscall(...) _syscall_n(_syscall_narg(__VA_ARGS__), ##__VA_ARGS__)
 
index 29fd92bd47d25c812780559f50cbb8627db912c3..87f89c789b3bc06908daa91a6da895f124fd3afb 100644 (file)
@@ -19,7 +19,7 @@
 static __attribute__((unused))
 int sys_timerfd_create(int clockid, int flags)
 {
-       return my_syscall2(__NR_timerfd_create, clockid, flags);
+       return __nolibc_syscall2(__NR_timerfd_create, clockid, flags);
 }
 
 static __attribute__((unused))
@@ -34,10 +34,10 @@ int sys_timerfd_gettime(int fd, struct itimerspec *curr_value)
 {
 #if defined(__NR_timerfd_gettime64)
        __nolibc_assert_time64_type(curr_value->it_value.tv_sec);
-       return my_syscall2(__NR_timerfd_gettime64, fd, curr_value);
+       return __nolibc_syscall2(__NR_timerfd_gettime64, fd, curr_value);
 #else
        __nolibc_assert_native_time64();
-       return my_syscall2(__NR_timerfd_gettime, fd, curr_value);
+       return __nolibc_syscall2(__NR_timerfd_gettime, fd, curr_value);
 #endif
 }
 
@@ -54,10 +54,10 @@ int sys_timerfd_settime(int fd, int flags,
 {
 #if defined(__NR_timerfd_settime64)
        __nolibc_assert_time64_type(new_value->it_value.tv_sec);
-       return my_syscall4(__NR_timerfd_settime64, fd, flags, new_value, old_value);
+       return __nolibc_syscall4(__NR_timerfd_settime64, fd, flags, new_value, old_value);
 #else
        __nolibc_assert_native_time64();
-       return my_syscall4(__NR_timerfd_settime, fd, flags, new_value, old_value);
+       return __nolibc_syscall4(__NR_timerfd_settime, fd, flags, new_value, old_value);
 #endif
 }
 
index 7ad42b927d2fa0f6ef35eea0de5032c5bd4a3c6c..21ff8c626dfe09127e8194601a4eda5d2a95ea58 100644 (file)
@@ -21,7 +21,7 @@
 static __attribute__((unused))
 ssize_t sys_readv(int fd, const struct iovec *iovec, int count)
 {
-       return my_syscall3(__NR_readv, fd, iovec, count);
+       return __nolibc_syscall3(__NR_readv, fd, iovec, count);
 }
 
 static __attribute__((unused))
@@ -36,7 +36,7 @@ ssize_t readv(int fd, const struct iovec *iovec, int count)
 static __attribute__((unused))
 ssize_t sys_writev(int fd, const struct iovec *iovec, int count)
 {
-       return my_syscall3(__NR_writev, fd, iovec, count);
+       return __nolibc_syscall3(__NR_writev, fd, iovec, count);
 }
 
 static __attribute__((unused))
index 01023e1bb439c1722c8a7b2cd85588f56a847d4f..25992d644525d4393b70bfe514f9864136fc2761 100644 (file)
@@ -30,7 +30,7 @@ struct utsname {
 static __attribute__((unused))
 int sys_uname(struct utsname *buf)
 {
-       return my_syscall1(__NR_uname, buf);
+       return __nolibc_syscall1(__NR_uname, buf);
 }
 
 static __attribute__((unused))
index 9d9319ba92cbd31ee00afa85a2105d7bb00751b8..bc11100e7f82aa9b073cd5a73580fe5c950406c5 100644 (file)
@@ -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))
index f9257d6a787839b5220d90da7e793a57e7a18c94..4d93d5188cecce889d6a5625bfc5dea676d6b6b3 100644 (file)
@@ -37,10 +37,10 @@ int sys_clock_getres(clockid_t clockid, struct timespec *res)
 {
 #if defined(__NR_clock_getres_time64)
        __nolibc_assert_time64_type(res->tv_sec);
-       return my_syscall2(__NR_clock_getres_time64, clockid, res);
+       return __nolibc_syscall2(__NR_clock_getres_time64, clockid, res);
 #else
        __nolibc_assert_native_time64();
-       return my_syscall2(__NR_clock_getres, clockid, res);
+       return __nolibc_syscall2(__NR_clock_getres, clockid, res);
 #endif
 }
 
@@ -55,10 +55,10 @@ int sys_clock_gettime(clockid_t clockid, struct timespec *tp)
 {
 #if defined(__NR_clock_gettime64)
        __nolibc_assert_time64_type(tp->tv_sec);
-       return my_syscall2(__NR_clock_gettime64, clockid, tp);
+       return __nolibc_syscall2(__NR_clock_gettime64, clockid, tp);
 #else
        __nolibc_assert_native_time64();
-       return my_syscall2(__NR_clock_gettime, clockid, tp);
+       return __nolibc_syscall2(__NR_clock_gettime, clockid, tp);
 #endif
 }
 
@@ -73,10 +73,10 @@ int sys_clock_settime(clockid_t clockid, struct timespec *tp)
 {
 #if defined(__NR_clock_settime64)
        __nolibc_assert_time64_type(tp->tv_sec);
-       return my_syscall2(__NR_clock_settime64, clockid, tp);
+       return __nolibc_syscall2(__NR_clock_settime64, clockid, tp);
 #else
        __nolibc_assert_native_time64();
-       return my_syscall2(__NR_clock_settime, clockid, tp);
+       return __nolibc_syscall2(__NR_clock_settime, clockid, tp);
 #endif
 }
 
@@ -92,10 +92,10 @@ int sys_clock_nanosleep(clockid_t clockid, int flags, const struct timespec *rqt
 {
 #if defined(__NR_clock_nanosleep_time64)
        __nolibc_assert_time64_type(rqtp->tv_sec);
-       return my_syscall4(__NR_clock_nanosleep_time64, clockid, flags, rqtp, rmtp);
+       return __nolibc_syscall4(__NR_clock_nanosleep_time64, clockid, flags, rqtp, rmtp);
 #else
        __nolibc_assert_native_time64();
-       return my_syscall4(__NR_clock_nanosleep, clockid, flags, rqtp, rmtp);
+       return __nolibc_syscall4(__NR_clock_nanosleep, clockid, flags, rqtp, rmtp);
 #endif
 }
 
@@ -143,7 +143,7 @@ time_t time(time_t *tptr)
 static __attribute__((unused))
 int sys_timer_create(clockid_t clockid, struct sigevent *evp, timer_t *timerid)
 {
-       return my_syscall3(__NR_timer_create, clockid, evp, timerid);
+       return __nolibc_syscall3(__NR_timer_create, clockid, evp, timerid);
 }
 
 static __attribute__((unused))
@@ -155,7 +155,7 @@ int timer_create(clockid_t clockid, struct sigevent *evp, timer_t *timerid)
 static __attribute__((unused))
 int sys_timer_delete(timer_t timerid)
 {
-       return my_syscall1(__NR_timer_delete, timerid);
+       return __nolibc_syscall1(__NR_timer_delete, timerid);
 }
 
 static __attribute__((unused))
@@ -169,10 +169,10 @@ int sys_timer_gettime(timer_t timerid, struct itimerspec *curr_value)
 {
 #if defined(__NR_timer_gettime64)
        __nolibc_assert_time64_type(curr_value->it_value.tv_sec);
-       return my_syscall2(__NR_timer_gettime64, timerid, curr_value);
+       return __nolibc_syscall2(__NR_timer_gettime64, timerid, curr_value);
 #else
        __nolibc_assert_native_time64();
-       return my_syscall2(__NR_timer_gettime, timerid, curr_value);
+       return __nolibc_syscall2(__NR_timer_gettime, timerid, curr_value);
 #endif
 }
 
@@ -188,10 +188,10 @@ int sys_timer_settime(timer_t timerid, int flags,
 {
 #if defined(__NR_timer_settime64)
        __nolibc_assert_time64_type(new_value->it_value.tv_sec);
-       return my_syscall4(__NR_timer_settime64, timerid, flags, new_value, old_value);
+       return __nolibc_syscall4(__NR_timer_settime64, timerid, flags, new_value, old_value);
 #else
        __nolibc_assert_native_time64();
-       return my_syscall4(__NR_timer_settime, timerid, flags, new_value, old_value);
+       return __nolibc_syscall4(__NR_timer_settime, timerid, flags, new_value, old_value);
 #endif
 }
 
index bb5e80f3f05d5490263326ca561f9d1aa9df6151..6456d60daa02d8fb0d33655ccd1b9e42cfa2eb90 100644 (file)
@@ -33,7 +33,7 @@
 static __attribute__((unused))
 int sys_faccessat(int fd, const char *path, int amode, int flag)
 {
-       return my_syscall4(__NR_faccessat, fd, path, amode, flag);
+       return __nolibc_syscall4(__NR_faccessat, fd, path, amode, flag);
 }
 
 static __attribute__((unused))