aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain/uClibc/patches-0.9.33/161-mips-add-INLINE_SYSCALL_NOERR-macro.patch
blob: 0cf367873430a602ddbd68c7d6286a0faa2a2578 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- a/libc/sysdeps/linux/mips/bits/syscalls.h
+++ b/libc/sysdeps/linux/mips/bits/syscalls.h
@@ -29,6 +29,12 @@
        }								\
      result_var; })
 
+#define INLINE_SYSCALL_NOERR(name, nr, args...)				\
+  ({ INTERNAL_SYSCALL_DECL(err);					\
+     long result_var = INTERNAL_SYSCALL(name, err, nr, args);		\
+     if (err) do { } while (0);						\
+     result_var; })
+
 #define INTERNAL_SYSCALL_DECL(err) long err
 
 #define INTERNAL_SYSCALL_ERROR_P(val, err)   ((long) (err))