diff options
| -rw-r--r-- | libc/sysdeps/linux/arm/bits/syscalls.h | 18 | ||||
| -rw-r--r-- | libc/sysdeps/linux/arm/sysdep.h | 34 | 
2 files changed, 26 insertions, 26 deletions
diff --git a/libc/sysdeps/linux/arm/bits/syscalls.h b/libc/sysdeps/linux/arm/bits/syscalls.h index 4aab048cf..4b587e4f5 100644 --- a/libc/sysdeps/linux/arm/bits/syscalls.h +++ b/libc/sysdeps/linux/arm/bits/syscalls.h @@ -42,7 +42,7 @@  #if !defined(__thumb__)  #if defined(__ARM_EABI__)  #define INTERNAL_SYSCALL_NCS(name, err, nr, args...)			\ -  ({unsigned int __sys_result;						\ +  ({unsigned int __internal_sys_result;					\       {									\         register int _a1 __asm__ ("r0"), _nr __asm__ ("r7");		\         LOAD_ARGS_##nr (args)						\ @@ -51,13 +51,13 @@  			     : "=r" (_a1)				\  			     : "r" (_nr) ASM_ARGS_##nr			\  			     : "memory");				\ -	       __sys_result = _a1;					\ +	       __internal_sys_result = _a1;				\       }									\ -     (int) __sys_result; }) +     (int) __internal_sys_result; })  #else /* defined(__ARM_EABI__) */  #define INTERNAL_SYSCALL_NCS(name, err, nr, args...)			\ -  ({ unsigned int __sys_result;						\ +  ({ unsigned int __internal_sys_result;				\       {									\         register int _a1 __asm__ ("a1");					\         LOAD_ARGS_##nr (args)						\ @@ -65,16 +65,16 @@  		     : "=r" (_a1)					\  		     : "i" (name) ASM_ARGS_##nr				\  		     : "memory");					\ -       __sys_result = _a1;						\ +       __internal_sys_result = _a1;					\       }									\ -     (int) __sys_result; }) +     (int) __internal_sys_result; })  #endif  #else /* !defined(__thumb__) */  /* We can't use push/pop inside the asm because that breaks     unwinding (ie. thread cancellation).   */  #define INTERNAL_SYSCALL_NCS(name, err, nr, args...)			\ -  ({ unsigned int __sys_result;						\ +  ({ unsigned int __internal_sys_result;				\      {									\        int _sys_buf[2];							\        register int _a1 __asm__ ("a1");					\ @@ -88,9 +88,9 @@  		    : "=r" (_a1)					\  		    : "r" (_v3) ASM_ARGS_##nr				\                      : "memory");					\ -	__sys_result = _a1;						\ +	__internal_sys_result = _a1;					\      }									\ -    (int) __sys_result; }) +    (int) __internal_sys_result; })  #endif /*!defined(__thumb__)*/  #define INTERNAL_SYSCALL_ERROR_P(val, err) \ diff --git a/libc/sysdeps/linux/arm/sysdep.h b/libc/sysdeps/linux/arm/sysdep.h index 42fb2d3b9..b47b5fac5 100644 --- a/libc/sysdeps/linux/arm/sysdep.h +++ b/libc/sysdeps/linux/arm/sysdep.h @@ -251,14 +251,14 @@ __local_syscall_error:						\  /* Define a macro which expands into the inline wrapper code for a system     call.  */  #undef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...)				\ -  ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, , nr, args);	\ -     if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result, ), 0))	\ -       {								\ -	 __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result, ));		\ -	 _sys_result = (unsigned int) -1;				\ -       }								\ -     (int) _sys_result; }) +#define INLINE_SYSCALL(name, nr, args...)					\ +  ({ unsigned int _inline_sys_result = INTERNAL_SYSCALL (name, , nr, args);	\ +     if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_inline_sys_result, ), 0))	\ +       {									\ +	 __set_errno (INTERNAL_SYSCALL_ERRNO (_inline_sys_result, ));		\ +	 _inline_sys_result = (unsigned int) -1;				\ +       }									\ +     (int) _inline_sys_result; })  #undef INTERNAL_SYSCALL_DECL  #define INTERNAL_SYSCALL_DECL(err) do { } while (0) @@ -272,7 +272,7 @@ __local_syscall_error:						\   * unwinding (ie. thread cancellation).   */  #define INTERNAL_SYSCALL_RAW(name, err, nr, args...)		\ -  ({ unsigned int _sys_result;					\ +  ({ unsigned int _internal_sys_result;				\      {								\        int _sys_buf[2];						\        register int _a1 __asm__ ("a1");				\ @@ -286,12 +286,12 @@ __local_syscall_error:						\                     : "=r" (_a1)					\                      : "r" (_v3) ASM_ARGS_##nr			\                      : "memory");				\ -      _sys_result = _a1;					\ +      _internal_sys_result = _a1;				\      }								\ -    (int) _sys_result; }) +    (int) _internal_sys_result; })  #elif defined(__ARM_EABI__)  #define INTERNAL_SYSCALL_RAW(name, err, nr, args...)		\ -  ({unsigned int _sys_result;					\ +  ({unsigned int _internal_sys_result;				\       {								\         register int _a1 __asm__ ("r0"), _nr __asm__ ("r7");	\         LOAD_ARGS_##nr (args)					\ @@ -300,12 +300,12 @@ __local_syscall_error:						\  		     : "=r" (_a1)				\  		     : "r" (_nr) ASM_ARGS_##nr			\  		     : "memory");				\ -       _sys_result = _a1;					\ +       _internal_sys_result = _a1;				\       }								\ -     (int) _sys_result; }) +     (int) _internal_sys_result; })  #else /* !defined(__ARM_EABI__) */  #define INTERNAL_SYSCALL_RAW(name, err, nr, args...)		\ -  ({ unsigned int _sys_result;					\ +  ({ unsigned int _internal_sys_result;				\       {								\         register int _a1 __asm__ ("a1");				\         LOAD_ARGS_##nr (args)					\ @@ -313,9 +313,9 @@ __local_syscall_error:						\  		     : "=r" (_a1)				\  		     : "i" (name) ASM_ARGS_##nr			\  		     : "memory");				\ -       _sys_result = _a1;					\ +       _internal_sys_result = _a1;				\       }								\ -     (int) _sys_result; }) +     (int) _internal_sys_result; })  #endif  #undef INTERNAL_SYSCALL  | 
