@@ -1028,11 +1028,10 @@ setxid_signal_thread (struct xid_command *cmdp, struct pthread *t)
int val;
pid_t pid = __getpid ();
- INTERNAL_SYSCALL_DECL (err);
- val = INTERNAL_SYSCALL_CALL (tgkill, err, pid, t->tid, SIGSETXID);
+ val = INTERNAL_SYSCALL_CALL (tgkill, pid, t->tid, SIGSETXID);
/* If this failed, it must have had not started yet or else exited. */
- if (!INTERNAL_SYSCALL_ERROR_P (val, err))
+ if (!INTERNAL_SYSCALL_ERROR_P (val))
{
atomic_increment (&cmdp->cntr);
return 1;
@@ -1158,13 +1157,12 @@ __nptl_setxid (struct xid_command *cmdp)
/* This must be last, otherwise the current thread might not have
permissions to send SIGSETXID syscall to the other threads. */
- INTERNAL_SYSCALL_DECL (err);
- result = INTERNAL_SYSCALL_NCS (cmdp->syscall_no, err, 3,
+ result = INTERNAL_SYSCALL_NCS (cmdp->syscall_no, 3,
cmdp->id[0], cmdp->id[1], cmdp->id[2]);
int error = 0;
- if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result, err)))
+ if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result)))
{
- error = INTERNAL_SYSCALL_ERRNO (result, err);
+ error = INTERNAL_SYSCALL_ERRNO (result);
__set_errno (error);
result = -1;
}
@@ -130,9 +130,8 @@ void
__nptl_set_robust (struct pthread *self)
{
#ifdef __NR_set_robust_list
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL (set_robust_list, err, 2, &self->robust_head,
- sizeof (struct robust_list_head));
+ INTERNAL_SYSCALL_CALL (set_robust_list, &self->robust_head,
+ sizeof (struct robust_list_head));
#endif
}
@@ -203,12 +202,11 @@ sighandler_setxid (int sig, siginfo_t *si, void *ctx)
|| si->si_code != SI_TKILL)
return;
- INTERNAL_SYSCALL_DECL (err);
- result = INTERNAL_SYSCALL_NCS (__xidcmd->syscall_no, err, 3, __xidcmd->id[0],
+ result = INTERNAL_SYSCALL_NCS (__xidcmd->syscall_no, 3, __xidcmd->id[0],
__xidcmd->id[1], __xidcmd->id[2]);
int error = 0;
- if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result, err)))
- error = INTERNAL_SYSCALL_ERRNO (result, err);
+ if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result)))
+ error = INTERNAL_SYSCALL_ERRNO (result);
__nptl_setxid_error (__xidcmd, error);
/* Reset the SETXID flag. */
@@ -258,10 +256,9 @@ __pthread_initialize_minimal_internal (void)
pd->robust_head.futex_offset = (offsetof (pthread_mutex_t, __data.__lock)
- offsetof (pthread_mutex_t,
__data.__list.__next));
- INTERNAL_SYSCALL_DECL (err);
- int res = INTERNAL_SYSCALL (set_robust_list, err, 2, &pd->robust_head,
- sizeof (struct robust_list_head));
- if (INTERNAL_SYSCALL_ERROR_P (res, err))
+ int res = INTERNAL_SYSCALL_CALL (set_robust_list, &pd->robust_head,
+ sizeof (struct robust_list_head));
+ if (INTERNAL_SYSCALL_ERROR_P (res))
#endif
set_robust_list_not_avail ();
}
@@ -299,11 +296,8 @@ __pthread_initialize_minimal_internal (void)
structure. It is already cleared. */
__sigaddset (&sa.sa_mask, SIGCANCEL);
__sigaddset (&sa.sa_mask, SIGSETXID);
- {
- INTERNAL_SYSCALL_DECL (err);
- (void) INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_UNBLOCK, &sa.sa_mask,
- NULL, _NSIG / 8);
- }
+ INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_UNBLOCK, &sa.sa_mask,
+ NULL, _NSIG / 8);
/* Get the size of the static and alignment requirements for the TLS
block. */
@@ -67,11 +67,10 @@ __pthread_cancel (pthread_t th)
thread as canceled. */
pid_t pid = __getpid ();
- INTERNAL_SYSCALL_DECL (err);
- int val = INTERNAL_SYSCALL_CALL (tgkill, err, pid, pd->tid,
+ int val = INTERNAL_SYSCALL_CALL (tgkill, pid, pd->tid,
SIGCANCEL);
- if (INTERNAL_SYSCALL_ERROR_P (val, err))
- result = INTERNAL_SYSCALL_ERRNO (val, err);
+ if (INTERNAL_SYSCALL_ERROR_P (val))
+ result = INTERNAL_SYSCALL_ERRNO (val);
break;
}
@@ -394,10 +394,9 @@ START_THREAD_DEFN
if (__set_robust_list_avail >= 0)
# endif
{
- INTERNAL_SYSCALL_DECL (err);
/* This call should never fail because the initial call in init.c
succeeded. */
- INTERNAL_SYSCALL (set_robust_list, err, 2, &pd->robust_head,
+ INTERNAL_SYSCALL (set_robust_list, 2, &pd->robust_head,
sizeof (struct robust_list_head));
}
#endif
@@ -407,12 +406,11 @@ START_THREAD_DEFN
cancellation signal mask. */
if (__glibc_unlikely (pd->parent_cancelhandling & CANCELING_BITMASK))
{
- INTERNAL_SYSCALL_DECL (err);
sigset_t mask;
__sigemptyset (&mask);
__sigaddset (&mask, SIGCANCEL);
- (void) INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_UNBLOCK, &mask,
- NULL, _NSIG / 8);
+ INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_UNBLOCK, &mask,
+ NULL, _NSIG / 8);
}
/* This is where the try/finally block should be created. For
@@ -297,13 +297,12 @@ __pthread_mutex_trylock (pthread_mutex_t *mutex)
int private = (robust
? PTHREAD_ROBUST_MUTEX_PSHARED (mutex)
: PTHREAD_MUTEX_PSHARED (mutex));
- INTERNAL_SYSCALL_DECL (__err);
- int e = INTERNAL_SYSCALL (futex, __err, 4, &mutex->__data.__lock,
- __lll_private_flag (FUTEX_TRYLOCK_PI,
- private), 0, 0);
+ int e = INTERNAL_SYSCALL_CALL (futex, &mutex->__data.__lock,
+ __lll_private_flag (FUTEX_TRYLOCK_PI,
+ private), 0, 0);
- if (INTERNAL_SYSCALL_ERROR_P (e, __err)
- && INTERNAL_SYSCALL_ERRNO (e, __err) == EWOULDBLOCK)
+ if (INTERNAL_SYSCALL_ERROR_P (e)
+ && INTERNAL_SYSCALL_ERRNO (e) == EWOULDBLOCK)
{
/* The kernel has not yet finished the mutex owner death.
We do not need to ensure ordering wrt another memory
@@ -39,16 +39,11 @@ pthread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask)
newmask = &local_newmask;
}
-#ifdef INTERNAL_SYSCALL
/* We know that realtime signals are available if NPTL is used. */
- INTERNAL_SYSCALL_DECL (err);
- int result = INTERNAL_SYSCALL (rt_sigprocmask, err, 4, how, newmask,
- oldmask, _NSIG / 8);
+ int result = INTERNAL_SYSCALL_CALL (rt_sigprocmask, how, newmask,
+ oldmask, _NSIG / 8);
- return (INTERNAL_SYSCALL_ERROR_P (result, err)
- ? INTERNAL_SYSCALL_ERRNO (result, err)
+ return (INTERNAL_SYSCALL_ERROR_P (result)
+ ? INTERNAL_SYSCALL_ERRNO (result)
: 0);
-#else
- return sigprocmask (how, newmask, oldmask) == -1 ? errno : 0;
-#endif
}
@@ -21,6 +21,5 @@
void
thrd_yield (void)
{
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL_CALL (sched_yield, err);
+ INTERNAL_SYSCALL_CALL (sched_yield);
}
@@ -96,11 +96,10 @@ typedef struct
special attention since 'errno' is not yet available and if the
operation can cause a failure 'errno' must not be touched. */
# define TLS_INIT_TP(tcbp) \
- ({ INTERNAL_SYSCALL_DECL (err); \
- long result_var; \
- result_var = INTERNAL_SYSCALL (set_thread_area, err, 1, \
+ ({ long result_var; \
+ result_var = INTERNAL_SYSCALL_CALL (set_thread_area, \
(char *) (tcbp) + TLS_TCB_OFFSET); \
- INTERNAL_SYSCALL_ERROR_P (result_var, err) \
+ INTERNAL_SYSCALL_ERROR_P (result_var) \
? "unknown error" : NULL; })
/* Return the address of the dtv for the current thread. */
@@ -202,8 +202,7 @@ tls_fill_user_desc (union user_desc_init *desc,
tls_fill_user_desc (&_segdescr, -1, _thrdescr); \
\
/* Install the TLS. */ \
- INTERNAL_SYSCALL_DECL (err); \
- _result = INTERNAL_SYSCALL (set_thread_area, err, 1, &_segdescr.desc); \
+ _result = INTERNAL_SYSCALL_CALL (set_thread_area, &_segdescr.desc); \
\
if (_result == 0) \
/* We know the index in the GDT, now load the segment register. \
@@ -95,12 +95,11 @@ typedef struct
operation can cause a failure 'errno' must not be touched. */
# define TLS_INIT_TP(tcbp) \
({ \
- INTERNAL_SYSCALL_DECL (err); \
int _sys_result; \
\
- _sys_result = INTERNAL_SYSCALL (set_thread_area, err, 1, \
+ _sys_result = INTERNAL_SYSCALL_CALL (set_thread_area, \
((void *) (tcbp)) + TLS_TCB_OFFSET); \
- INTERNAL_SYSCALL_ERROR_P (_sys_result, err) ? "unknown error" : NULL; })
+ INTERNAL_SYSCALL_ERROR_P (_sys_result) ? "unknown error" : NULL; })
# define TLS_DEFINE_INIT_TP(tp, pd) \
void *tp = (void *) (pd) + TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE
@@ -120,11 +120,10 @@ typedef struct
special attention since 'errno' is not yet available and if the
operation can cause a failure 'errno' must not be touched. */
# define TLS_INIT_TP(tcbp) \
- ({ INTERNAL_SYSCALL_DECL (err); \
- long result_var; \
- result_var = INTERNAL_SYSCALL (set_thread_area, err, 1, \
+ ({ long result_var; \
+ result_var = INTERNAL_SYSCALL_CALL (set_thread_area, \
(char *) (tcbp) + TLS_TCB_OFFSET); \
- INTERNAL_SYSCALL_ERROR_P (result_var, err) \
+ INTERNAL_SYSCALL_ERROR_P (result_var) \
? "unknown error" : NULL; })
/* Value passed to 'clone' for initialization of the thread register. */
@@ -65,13 +65,12 @@
(((fl) | FUTEX_PRIVATE_FLAG) ^ (private))
# endif
-# define lll_futex_syscall(nargs, futexp, op, ...) \
+# define lll_futex_syscall(nargs, futexp, op, ...) \
({ \
- INTERNAL_SYSCALL_DECL (__err); \
- long int __ret = INTERNAL_SYSCALL (futex, __err, nargs, futexp, op, \
+ long int __ret = INTERNAL_SYSCALL (futex, nargs, futexp, op, \
__VA_ARGS__); \
- (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (__ret, __err)) \
- ? -INTERNAL_SYSCALL_ERRNO (__ret, __err) : 0); \
+ (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (__ret)) \
+ ? -INTERNAL_SYSCALL_ERRNO (__ret) : 0); \
})
/* For most of these macros, the return value is never really used.
@@ -67,11 +67,10 @@ libc_hidden_proto (__feraiseexcept_soft)
do \
{ \
int _r; \
- INTERNAL_SYSCALL_DECL (_err); \
\
_spefscr = fegetenv_register (); \
- _r = INTERNAL_SYSCALL (prctl, _err, 2, PR_GET_FPEXC, &_ftrapex); \
- if (INTERNAL_SYSCALL_ERROR_P (_r, _err)) \
+ _r = INTERNAL_SYSCALL_CALL (prctl, PR_GET_FPEXC, &_ftrapex); \
+ if (INTERNAL_SYSCALL_ERROR_P (_r)) \
_ftrapex = 0; \
} \
while (0)
@@ -28,24 +28,24 @@
#define __SYSCALL_CONCAT(a,b) __SYSCALL_CONCAT_X (a, b)
-#define __INTERNAL_SYSCALL0(name, err) \
- INTERNAL_SYSCALL (name, err, 0)
-#define __INTERNAL_SYSCALL1(name, err, a1) \
- INTERNAL_SYSCALL (name, err, 1, a1)
-#define __INTERNAL_SYSCALL2(name, err, a1, a2) \
- INTERNAL_SYSCALL (name, err, 2, a1, a2)
-#define __INTERNAL_SYSCALL3(name, err, a1, a2, a3) \
- INTERNAL_SYSCALL (name, err, 3, a1, a2, a3)
-#define __INTERNAL_SYSCALL4(name, err, a1, a2, a3, a4) \
- INTERNAL_SYSCALL (name, err, 4, a1, a2, a3, a4)
-#define __INTERNAL_SYSCALL5(name, err, a1, a2, a3, a4, a5) \
- INTERNAL_SYSCALL (name, err, 5, a1, a2, a3, a4, a5)
-#define __INTERNAL_SYSCALL6(name, err, a1, a2, a3, a4, a5, a6) \
- INTERNAL_SYSCALL (name, err, 6, a1, a2, a3, a4, a5, a6)
-#define __INTERNAL_SYSCALL7(name, err, a1, a2, a3, a4, a5, a6, a7) \
- INTERNAL_SYSCALL (name, err, 7, a1, a2, a3, a4, a5, a6, a7)
-
-#define __INTERNAL_SYSCALL_NARGS_X(a,b,c,d,e,f,g,h,n,o,...) o
+#define __INTERNAL_SYSCALL0(name) \
+ INTERNAL_SYSCALL (name, 0)
+#define __INTERNAL_SYSCALL1(name, a1) \
+ INTERNAL_SYSCALL (name, 1, a1)
+#define __INTERNAL_SYSCALL2(name, a1, a2) \
+ INTERNAL_SYSCALL (name, 2, a1, a2)
+#define __INTERNAL_SYSCALL3(name, a1, a2, a3) \
+ INTERNAL_SYSCALL (name, 3, a1, a2, a3)
+#define __INTERNAL_SYSCALL4(name, a1, a2, a3, a4) \
+ INTERNAL_SYSCALL (name, 4, a1, a2, a3, a4)
+#define __INTERNAL_SYSCALL5(name, a1, a2, a3, a4, a5) \
+ INTERNAL_SYSCALL (name, 5, a1, a2, a3, a4, a5)
+#define __INTERNAL_SYSCALL6(name, a1, a2, a3, a4, a5, a6) \
+ INTERNAL_SYSCALL (name, 6, a1, a2, a3, a4, a5, a6)
+#define __INTERNAL_SYSCALL7(name, a1, a2, a3, a4, a5, a6, a7) \
+ INTERNAL_SYSCALL (name, 7, a1, a2, a3, a4, a5, a6, a7)
+
+#define __INTERNAL_SYSCALL_NARGS_X(a,b,c,d,e,f,g,h,n,...) n
#define __INTERNAL_SYSCALL_NARGS(...) \
__INTERNAL_SYSCALL_NARGS_X (__VA_ARGS__,7,6,5,4,3,2,1,0,)
#define __INTERNAL_SYSCALL_DISP(b,...) \
@@ -171,7 +171,7 @@
# define SINGLE_THREAD_BY_GLOBAL 1
# undef INTERNAL_SYSCALL_RAW
-# define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \
+# define INTERNAL_SYSCALL_RAW(name, nr, args...) \
({ long _sys_result; \
{ \
LOAD_ARGS_##nr (args) \
@@ -183,12 +183,12 @@
_sys_result; })
# undef INTERNAL_SYSCALL
-# define INTERNAL_SYSCALL(name, err, nr, args...) \
- INTERNAL_SYSCALL_RAW(SYS_ify(name), err, nr, args)
+# define INTERNAL_SYSCALL(name, nr, args...) \
+ INTERNAL_SYSCALL_RAW(SYS_ify(name), nr, args)
# undef INTERNAL_SYSCALL_AARCH64
-# define INTERNAL_SYSCALL_AARCH64(name, err, nr, args...) \
- INTERNAL_SYSCALL_RAW(__ARM_NR_##name, err, nr, args)
+# define INTERNAL_SYSCALL_AARCH64(name, nr, args...) \
+ INTERNAL_SYSCALL_RAW(__ARM_NR_##name, nr, args)
# define LOAD_ARGS_0() \
register long _x0 asm ("x0");
@@ -231,8 +231,8 @@
# define ASM_ARGS_7 ASM_ARGS_6, "r" (_x6)
# undef INTERNAL_SYSCALL_NCS
-# define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
- INTERNAL_SYSCALL_RAW (number, err, nr, args)
+# define INTERNAL_SYSCALL_NCS(number, nr, args...) \
+ INTERNAL_SYSCALL_RAW (number, nr, args)
#endif /* __ASSEMBLER__ */
@@ -31,8 +31,7 @@ __aio_start_notify_thread (void)
{
sigset_t ss;
sigemptyset (&ss);
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, NULL, _NSIG / 8);
+ INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_SETMASK, &ss, NULL, _NSIG / 8);
}
extern inline int
@@ -53,13 +52,12 @@ __aio_create_helper_thread (pthread_t *threadp, void *(*tf) (void *),
sigset_t ss;
sigset_t oss;
sigfillset (&ss);
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, &oss, _NSIG / 8);
+ INTERNAL_SYSCALL (rt_sigprocmask, 4, SIG_SETMASK, &ss, &oss, _NSIG / 8);
int ret = pthread_create (threadp, &attr, tf, arg);
/* Restore the signal mask. */
- INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &oss, NULL,
+ INTERNAL_SYSCALL (rt_sigprocmask, 4, SIG_SETMASK, &oss, NULL,
_NSIG / 8);
(void) pthread_attr_destroy (&attr);
@@ -33,23 +33,22 @@
int
__fxstat (int vers, int fd, struct stat *buf)
{
- INTERNAL_SYSCALL_DECL (err);
int result;
struct kernel_stat kbuf;
if (vers == _STAT_VER_KERNEL64)
{
- result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf);
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ result = INTERNAL_SYSCALL_CALL (fstat64, fd, buf);
+ if (__glibc_likely (!INTERNAL_SYSCALL_ERROR_P (result)))
return result;
- __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result));
return -1;
}
- result = INTERNAL_SYSCALL (fstat, err, 2, fd, &kbuf);
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ result = INTERNAL_SYSCALL_CALL (fstat, fd, &kbuf);
+ if (__glibc_likely (!INTERNAL_SYSCALL_ERROR_P (result)))
return __xstat_conv (vers, &kbuf, buf);
- __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result));
return -1;
}
hidden_def (__fxstat)
@@ -33,7 +33,6 @@
int
__fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
{
- INTERNAL_SYSCALL_DECL (err);
int result, errno_out;
/* ??? The __fxstatat entry point is new enough that it must be using
@@ -41,10 +40,10 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
cannot actually check this, lest the compiler not optimize the rest
of the function away. */
- result = INTERNAL_SYSCALL (fstatat64, err, 4, fd, file, st, flag);
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ result = INTERNAL_SYSCALL_CALL (fstatat64, fd, file, st, flag);
+ if (__glibc_likely (!INTERNAL_SYSCALL_ERROR_P (result)))
return result;
- errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
+ errno_out = INTERNAL_SYSCALL_ERRNO (result);
__set_errno (errno_out);
return -1;
}
@@ -33,23 +33,22 @@
int
__lxstat (int vers, const char *name, struct stat *buf)
{
- INTERNAL_SYSCALL_DECL (err);
int result;
struct kernel_stat kbuf;
if (vers == _STAT_VER_KERNEL64)
{
- result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf);
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ result = INTERNAL_SYSCALL_CALL (lstat64, name, buf);
+ if (__glibc_likely (!INTERNAL_SYSCALL_ERROR_P (result)))
return result;
- __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result));
return -1;
}
- result = INTERNAL_SYSCALL (lstat, err, 2, name, &kbuf);
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ result = INTERNAL_SYSCALL_CALL (lstat, name, &kbuf);
+ if (__glibc_likely (!INTERNAL_SYSCALL_ERROR_P (result)))
return __xstat_conv (vers, &kbuf, buf);
- __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result));
return -1;
}
hidden_def (__lxstat)
@@ -169,10 +169,10 @@ __LABEL(name) \
#else /* !ASSEMBLER */
-#define INTERNAL_SYSCALL(name, err_out, nr, args...) \
+#define INTERNAL_SYSCALL(name, nr, args...) \
internal_syscall##nr(__NR_##name, args)
-#define INTERNAL_SYSCALL_NCS(name, err_out, nr, args...) \
+#define INTERNAL_SYSCALL_NCS(name, nr, args...) \
internal_syscall##nr(name, args)
/* The normal Alpha calling convention sign-extends 32-bit quantties
@@ -33,23 +33,22 @@
int
__xstat (int vers, const char *name, struct stat *buf)
{
- INTERNAL_SYSCALL_DECL (err);
int result;
struct kernel_stat kbuf;
if (vers == _STAT_VER_KERNEL64)
{
- result = INTERNAL_SYSCALL (stat64, err, 2, name, buf);
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ result = INTERNAL_SYSCALL_CALL (stat64, name, buf);
+ if (__glibc_likely (!INTERNAL_SYSCALL_ERROR_P (result)))
return result;
- __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result));
return -1;
}
- result = INTERNAL_SYSCALL (stat, err, 2, name, &kbuf);
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ result = INTERNAL_SYSCALL_CALL (stat, name, &kbuf);
+ if (__glibc_likely (!INTERNAL_SYSCALL_ERROR_P (result)))
return __xstat_conv (vers, &kbuf, buf);
- __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result));
return -1;
}
hidden_def (__xstat)
@@ -20,7 +20,7 @@
/* This definition is Linux-specific. */
#define CLEAR_CACHE(BEG,END) \
- INTERNAL_SYSCALL (cacheflush, , 3, (BEG), (END), 0)
+ INTERNAL_SYSCALL_CALL (cacheflush, (BEG), (END), 0)
#endif
@@ -328,7 +328,7 @@ __local_syscall_error: \
then unwinding will fail higher up the stack. So we move the
syscall out of line and provide its own unwind information. */
# undef INTERNAL_SYSCALL_RAW
-# define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \
+# define INTERNAL_SYSCALL_RAW(name, nr, args...) \
({ \
register int _a1 asm ("a1"); \
int _nametmp = name; \
@@ -341,7 +341,7 @@ __local_syscall_error: \
_a1; })
#else /* ARM */
# undef INTERNAL_SYSCALL_RAW
-# define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \
+# define INTERNAL_SYSCALL_RAW(name, nr, args...) \
({ \
register int _a1 asm ("r0"), _nr asm ("r7"); \
LOAD_ARGS_##nr (args) \
@@ -354,8 +354,8 @@ __local_syscall_error: \
#endif
#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...) \
- INTERNAL_SYSCALL_RAW(SYS_ify(name), err, nr, args)
+#define INTERNAL_SYSCALL(name, nr, args...) \
+ INTERNAL_SYSCALL_RAW(SYS_ify(name), nr, args)
#define VDSO_NAME "LINUX_2.6"
#define VDSO_HASH 61765110
@@ -407,8 +407,8 @@ __local_syscall_error: \
/* For EABI, non-constant syscalls are actually pretty easy... */
#undef INTERNAL_SYSCALL_NCS
-#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
- INTERNAL_SYSCALL_RAW (number, err, nr, args)
+#define INTERNAL_SYSCALL_NCS(number, nr, args...) \
+ INTERNAL_SYSCALL_RAW (number, nr, args)
#define SINGLE_THREAD_BY_GLOBAL 1
@@ -31,10 +31,9 @@
special attention since 'errno' is not yet available and if the
operation can cause a failure 'errno' must not be touched. */
# define TLS_INIT_TP(tcbp) \
- ({ INTERNAL_SYSCALL_DECL (err); \
- long int result_var; \
- result_var = INTERNAL_SYSCALL (set_tls, err, 1, (tcbp)); \
- INTERNAL_SYSCALL_ERROR_P (result_var, err) \
+ ({ long int result_var; \
+ result_var = INTERNAL_SYSCALL_CALL (set_tls, 1, (tcbp)); \
+ INTERNAL_SYSCALL_ERROR_P (result_var) \
? "unknown error" : NULL; })
#endif /* __ASSEMBLER__ */
@@ -30,21 +30,20 @@ __clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
const clockid_t pidclock = MAKE_PROCESS_CPUCLOCK (pid, CPUCLOCK_SCHED);
- INTERNAL_SYSCALL_DECL (err);
- int r = INTERNAL_SYSCALL (clock_getres, err, 2, pidclock, NULL);
- if (!INTERNAL_SYSCALL_ERROR_P (r, err))
+ int r = INTERNAL_SYSCALL_CALL (clock_getres, pidclock, NULL);
+ if (!INTERNAL_SYSCALL_ERROR_P (r))
{
*clock_id = pidclock;
return 0;
}
- if (INTERNAL_SYSCALL_ERRNO (r, err) == EINVAL)
+ if (INTERNAL_SYSCALL_ERRNO (r) == EINVAL)
{
/* The clock_getres system call checked the PID for us. */
return ESRCH;
}
else
- return INTERNAL_SYSCALL_ERRNO (r, err);
+ return INTERNAL_SYSCALL_ERRNO (r);
}
versioned_symbol (libc, __clock_getcpuclockid, clock_getcpuclockid, GLIBC_2_17);
@@ -39,23 +39,21 @@ __clock_nanosleep_time64 (clockid_t clock_id, int flags, const struct __timespec
/* If the call is interrupted by a signal handler or encounters an error,
it returns a positive value similar to errno. */
- INTERNAL_SYSCALL_DECL (err);
-
#ifdef __ASSUME_TIME64_SYSCALLS
# ifndef __NR_clock_nanosleep_time64
# define __NR_clock_nanosleep_time64 __NR_clock_nanosleep
# endif
- r = INTERNAL_SYSCALL_CANCEL (clock_nanosleep_time64, err, clock_id,
+ r = INTERNAL_SYSCALL_CANCEL (clock_nanosleep_time64, clock_id,
flags, req, rem);
#else
# ifdef __NR_clock_nanosleep_time64
- r = INTERNAL_SYSCALL_CANCEL (clock_nanosleep_time64, err, clock_id,
+ r = INTERNAL_SYSCALL_CANCEL (clock_nanosleep_time64, clock_id,
flags, req, rem);
- if (! INTERNAL_SYSCALL_ERROR_P (r, err))
+ if (! INTERNAL_SYSCALL_ERROR_P (r))
return 0;
- if (INTERNAL_SYSCALL_ERRNO (r, err) != ENOSYS)
- return INTERNAL_SYSCALL_ERRNO (r, err);
+ if (INTERNAL_SYSCALL_ERRNO (r) != ENOSYS)
+ return INTERNAL_SYSCALL_ERRNO (r);
# endif /* __NR_clock_nanosleep_time64 */
if (! in_time_t_range (req->tv_sec))
@@ -66,18 +64,18 @@ __clock_nanosleep_time64 (clockid_t clock_id, int flags, const struct __timespec
struct timespec tr32;
struct timespec ts32 = valid_timespec64_to_timespec (*req);
- r = INTERNAL_SYSCALL_CANCEL (clock_nanosleep, err, clock_id, flags,
+ r = INTERNAL_SYSCALL_CANCEL (clock_nanosleep, clock_id, flags,
&ts32, &tr32);
- if (INTERNAL_SYSCALL_ERROR_P (r, err))
+ if (INTERNAL_SYSCALL_ERROR_P (r))
{
- if (INTERNAL_SYSCALL_ERRNO (r, err) == EINTR && rem != NULL
+ if (INTERNAL_SYSCALL_ERRNO (r) == EINTR && rem != NULL
&& (flags & TIMER_ABSTIME) == 0)
*rem = valid_timespec_to_timespec64 (tr32);
}
#endif /* __ASSUME_TIME64_SYSCALLS */
- return (INTERNAL_SYSCALL_ERROR_P (r, err)
- ? INTERNAL_SYSCALL_ERRNO (r, err) : 0);
+ return (INTERNAL_SYSCALL_ERROR_P (r)
+ ? INTERNAL_SYSCALL_ERRNO (r) : 0);
}
#if __TIMESIZE != 64
@@ -110,7 +110,6 @@ create_thread (struct pthread *pd, const struct pthread_attr *attr,
/* Now we have the possibility to set scheduling parameters etc. */
if (attr != NULL)
{
- INTERNAL_SYSCALL_DECL (err);
int res;
/* Set the affinity mask if necessary. */
@@ -118,21 +117,19 @@ create_thread (struct pthread *pd, const struct pthread_attr *attr,
{
assert (*stopped_start);
- res = INTERNAL_SYSCALL (sched_setaffinity, err, 3, pd->tid,
- attr->cpusetsize, attr->cpuset);
+ res = INTERNAL_SYSCALL_CALL (sched_setaffinity, pd->tid,
+ attr->cpusetsize, attr->cpuset);
- if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (res, err)))
+ if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (res)))
err_out:
{
/* The operation failed. We have to kill the thread.
We let the normal cancellation mechanism do the work. */
pid_t pid = __getpid ();
- INTERNAL_SYSCALL_DECL (err2);
- (void) INTERNAL_SYSCALL_CALL (tgkill, err2, pid, pd->tid,
- SIGCANCEL);
+ INTERNAL_SYSCALL_CALL (tgkill, pid, pd->tid, SIGCANCEL);
- return INTERNAL_SYSCALL_ERRNO (res, err);
+ return INTERNAL_SYSCALL_ERRNO (res);
}
}
@@ -141,10 +138,10 @@ create_thread (struct pthread *pd, const struct pthread_attr *attr,
{
assert (*stopped_start);
- res = INTERNAL_SYSCALL (sched_setscheduler, err, 3, pd->tid,
- pd->schedpolicy, &pd->schedparam);
+ res = INTERNAL_SYSCALL_CALL (sched_setscheduler, pd->tid,
+ pd->schedpolicy, &pd->schedparam);
- if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (res, err)))
+ if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (res)))
goto err_out;
}
}
@@ -294,7 +294,7 @@ __local_syscall_error: \
#else /* not __ASSEMBLER__ */
# undef INTERNAL_SYSCALL_RAW
-# define INTERNAL_SYSCALL_RAW0(name, err, dummy...) \
+# define INTERNAL_SYSCALL_RAW0(name, dummy...) \
({unsigned int __sys_result; \
{ \
register int _a1 __asm__ ("a0"), _nr __asm__ ("r7"); \
@@ -307,7 +307,7 @@ __local_syscall_error: \
} \
(int) __sys_result; })
-# define INTERNAL_SYSCALL_RAW1(name, err, arg1) \
+# define INTERNAL_SYSCALL_RAW1(name, arg1) \
({unsigned int __sys_result; \
register int _tmp_arg1 = (int)(arg1); \
{ \
@@ -322,7 +322,7 @@ __local_syscall_error: \
} \
(int) __sys_result; })
-# define INTERNAL_SYSCALL_RAW2(name, err, arg1, arg2) \
+# define INTERNAL_SYSCALL_RAW2(name, arg1, arg2) \
({unsigned int __sys_result; \
register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2); \
{ \
@@ -338,7 +338,7 @@ __local_syscall_error: \
} \
(int) __sys_result; })
-# define INTERNAL_SYSCALL_RAW3(name, err, arg1, arg2, arg3) \
+# define INTERNAL_SYSCALL_RAW3(name, arg1, arg2, arg3) \
({unsigned int __sys_result; \
register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2); \
register int _tmp_arg3 = (int)(arg3); \
@@ -359,7 +359,7 @@ __local_syscall_error: \
} \
(int) __sys_result; })
-# define INTERNAL_SYSCALL_RAW4(name, err, arg1, arg2, arg3, arg4) \
+# define INTERNAL_SYSCALL_RAW4(name, arg1, arg2, arg3, arg4) \
({unsigned int __sys_result; \
register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2); \
register int _tmp_arg3 = (int)(arg3), _tmp_arg4 = (int)(arg4); \
@@ -379,7 +379,7 @@ __local_syscall_error: \
} \
(int) __sys_result; })
-# define INTERNAL_SYSCALL_RAW5(name, err, arg1, arg2, arg3, arg4, \
+# define INTERNAL_SYSCALL_RAW5(name, arg1, arg2, arg3, arg4, \
arg5) \
({unsigned int __sys_result; \
register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2); \
@@ -402,7 +402,7 @@ __local_syscall_error: \
} \
(int) __sys_result; })
-# define INTERNAL_SYSCALL_RAW6(name, err, arg1, arg2, arg3, arg4, \
+# define INTERNAL_SYSCALL_RAW6(name, arg1, arg2, arg3, arg4, \
arg5, arg6) \
({unsigned int __sys_result; \
register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2); \
@@ -426,7 +426,7 @@ __local_syscall_error: \
} \
(int) __sys_result; })
-# define INTERNAL_SYSCALL_RAW7(name, err, arg1, arg2, arg3, arg4, \
+# define INTERNAL_SYSCALL_RAW7(name, arg1, arg2, arg3, arg4, \
arg5, arg6, arg7) \
({unsigned int __sys_result; \
register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2); \
@@ -454,12 +454,12 @@ __local_syscall_error: \
(int) __sys_result; })
# undef INTERNAL_SYSCALL
-# define INTERNAL_SYSCALL(name, err, nr, args...) \
- INTERNAL_SYSCALL_RAW##nr(SYS_ify(name), err, args)
+# define INTERNAL_SYSCALL(name, nr, args...) \
+ INTERNAL_SYSCALL_RAW##nr(SYS_ify(name), args)
# undef INTERNAL_SYSCALL_NCS
-# define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
- INTERNAL_SYSCALL_RAW##nr (number, err, args)
+# define INTERNAL_SYSCALL_NCS(number, nr, args...) \
+ INTERNAL_SYSCALL_RAW##nr (number, args)
#endif /* __ASSEMBLER__ */
@@ -26,17 +26,15 @@
static void
collect_default_sched (struct pthread *pd)
{
- INTERNAL_SYSCALL_DECL (scerr);
-
if ((pd->flags & ATTR_FLAG_POLICY_SET) == 0)
{
- pd->schedpolicy = INTERNAL_SYSCALL (sched_getscheduler, scerr, 1, 0);
+ pd->schedpolicy = INTERNAL_SYSCALL_CALL (sched_getscheduler, 0);
pd->flags |= ATTR_FLAG_POLICY_SET;
}
if ((pd->flags & ATTR_FLAG_SCHED_SET) == 0)
{
- INTERNAL_SYSCALL (sched_getparam, scerr, 2, 0, &pd->schedparam);
+ INTERNAL_SYSCALL_CALL (sched_getparam, 0, &pd->schedparam);
pd->flags |= ATTR_FLAG_SCHED_SET;
}
}
@@ -37,11 +37,10 @@ _dl_get_origin (void)
char linkval[PATH_MAX];
char *result;
int len;
- INTERNAL_SYSCALL_DECL (err);
- len = INTERNAL_SYSCALL (readlink, err, 3, "/proc/self/exe", linkval,
- sizeof (linkval));
- if (! INTERNAL_SYSCALL_ERROR_P (len, err) && len > 0 && linkval[0] != '[')
+ len = INTERNAL_SYSCALL_CALL (readlink, "/proc/self/exe", linkval,
+ sizeof (linkval));
+ if (! INTERNAL_SYSCALL_ERROR_P (len) && len > 0 && linkval[0] != '[')
{
/* We can use this value. */
assert (linkval[0] == '/');
@@ -33,6 +33,5 @@
static inline void
_dl_writev (int fd, const struct iovec *iov, size_t niov)
{
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL (writev, err, 3, fd, iov, niov);
+ INTERNAL_SYSCALL_CALL (writev, fd, iov, niov);
}
@@ -32,7 +32,6 @@ __exit_thread (void)
of the caller and doing unexpectedly strange things. */
while (1)
{
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL (exit, err, 1, 0);
+ INTERNAL_SYSCALL_CALL (exit, 0);
}
}
@@ -51,14 +51,13 @@ __fcntl64_nocancel_adjusted (int fd, int cmd, void *arg)
{
if (cmd == F_GETOWN)
{
- INTERNAL_SYSCALL_DECL (err);
struct f_owner_ex fex;
- int res = INTERNAL_SYSCALL_CALL (fcntl64, err, fd, F_GETOWN_EX, &fex);
- if (!INTERNAL_SYSCALL_ERROR_P (res, err))
+ int res = INTERNAL_SYSCALL_CALL (fcntl64, fd, F_GETOWN_EX, &fex);
+ if (!INTERNAL_SYSCALL_ERROR_P (res))
return fex.type == F_OWNER_GID ? -fex.pid : fex.pid;
return INLINE_SYSCALL_ERROR_RETURN_VALUE
- (INTERNAL_SYSCALL_ERRNO (res, err));
+ (INTERNAL_SYSCALL_ERRNO (res));
}
return INLINE_SYSCALL_CALL (fcntl64, fd, cmd, (void *) arg);
@@ -37,15 +37,14 @@ int
__fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
{
int result;
- INTERNAL_SYSCALL_DECL (err);
#ifdef STAT_IS_KERNEL_STAT
# define kst (*st)
#else
struct kernel_stat kst;
#endif
- result = INTERNAL_SYSCALL (newfstatat, err, 4, fd, file, &kst, flag);
- if (!__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ result = INTERNAL_SYSCALL_CALL (newfstatat, fd, file, &kst, flag);
+ if (!__glibc_likely (INTERNAL_SYSCALL_ERROR_P (result)))
{
#ifdef STAT_IS_KERNEL_STAT
return 0;
@@ -53,9 +52,7 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
return __xstat_conv (vers, &kst, st);
#endif
}
- else
- return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result,
- err));
+ return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result));
}
libc_hidden_def (__fxstatat)
#if XSTAT_IS_XSTAT64
@@ -37,22 +37,19 @@ __fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
int result;
- INTERNAL_SYSCALL_DECL (err);
#ifdef __NR_fstatat64
- result = INTERNAL_SYSCALL (fstatat64, err, 4, fd, file, st, flag);
+ result = INTERNAL_SYSCALL_CALL (fstatat64, fd, file, st, flag);
#else
struct statx tmp;
- result = INTERNAL_SYSCALL (statx, err, 5, fd, file, AT_NO_AUTOMOUNT | flag,
- STATX_BASIC_STATS, &tmp);
+ result = INTERNAL_SYSCALL_CALL (statx, fd, file, AT_NO_AUTOMOUNT | flag,
+ STATX_BASIC_STATS, &tmp);
if (result == 0)
__cp_stat64_statx (st, &tmp);
#endif
- if (!__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ if (!__glibc_likely (INTERNAL_SYSCALL_ERROR_P (result)))
return 0;
- else
- return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result,
- err));
+ return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result));
}
libc_hidden_def (__fxstatat64)
@@ -36,7 +36,6 @@ void ____longjmp_chk (__jmp_buf env, int val)
{
void *this_frame = __builtin_frame_address (0);
void *saved_frame = JB_FRAME_ADDRESS (env);
- INTERNAL_SYSCALL_DECL (err);
stack_t ss;
/* If "env" is from a frame that called us, we're all set. */
@@ -44,7 +43,7 @@ void ____longjmp_chk (__jmp_buf env, int val)
__longjmp (env, val);
/* If we can't get the current stack state, give up and do the longjmp. */
- if (INTERNAL_SYSCALL (sigaltstack, err, 2, NULL, &ss) != 0)
+ if (INTERNAL_SYSCALL_CALL (sigaltstack, NULL, &ss) != 0)
__longjmp (env, val);
/* If we we are executing on the alternate stack and within the
@@ -31,9 +31,7 @@ weak_alias (__curbrk, ___brk_addr)
int
__brk (void *addr)
{
- INTERNAL_SYSCALL_DECL (err);
-
- __curbrk = (void *) INTERNAL_SYSCALL (brk, err, 1, addr);
+ __curbrk = (void *) INTERNAL_SYSCALL_CALL (brk, addr);
if (__curbrk < addr)
{
__set_errno (ENOMEM);
@@ -38,11 +38,10 @@ _dl_get_origin (void)
char linkval[PATH_MAX];
char *result;
int len;
- INTERNAL_SYSCALL_DECL (err);
- len = INTERNAL_SYSCALL (readlinkat, err, 4, AT_FDCWD, "/proc/self/exe",
- linkval, sizeof (linkval));
- if (! INTERNAL_SYSCALL_ERROR_P (len, err) && len > 0 && linkval[0] != '[')
+ len = INTERNAL_SYSCALL_CALL (readlinkat, AT_FDCWD, "/proc/self/exe",
+ linkval, sizeof (linkval));
+ if (! INTERNAL_SYSCALL_ERROR_P (len) && len > 0 && linkval[0] != '[')
{
/* We can use this value. */
assert (linkval[0] == '/');
@@ -28,15 +28,14 @@
if ((unsigned long) (sp) > this_sp) \
{ \
stack_t oss; \
- INTERNAL_SYSCALL_DECL (err); \
- int result = INTERNAL_SYSCALL (sigaltstack, err, 2, NULL, &oss);\
+ int result = INTERNAL_SYSCALL_CALL (sigaltstack, NULL, &oss);\
/* If we aren't using an alternate stack then we have already \
shown that we are jumping to a frame that doesn't exist so \
error out. If we are using an alternate stack we must prove \
that we are jumping *out* of the alternate stack. Note that \
the check for that is the same as that for _STACK_GROWS_UP \
as for _STACK_GROWS_DOWN. */ \
- if (!INTERNAL_SYSCALL_ERROR_P (result, err) \
+ if (!INTERNAL_SYSCALL_ERROR_P (result) \
&& ((oss.ss_flags & SS_ONSTACK) == 0 \
|| ((unsigned long) oss.ss_sp + oss.ss_size \
- (unsigned long) (sp)) < oss.ss_size)) \
@@ -362,7 +362,7 @@ L(pre_end): ASM_LINE_SEP \
/* Similar to INLINE_SYSCALL but we don't set errno */
#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...) \
+#define INTERNAL_SYSCALL(name, nr, args...) \
({ \
long __sys_res; \
{ \
@@ -388,7 +388,7 @@ L(pre_end): ASM_LINE_SEP \
/* The _NCS variant allows non-constant syscall numbers. */
#undef INTERNAL_SYSCALL_NCS
-#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+#define INTERNAL_SYSCALL_NCS(name, nr, args...) \
({ \
long __sys_res; \
{ \
@@ -36,8 +36,7 @@ weak_alias (__curbrk, ___brk_addr)
int
__brk (void *addr)
{
- INTERNAL_SYSCALL_DECL (err);
- void *newbrk = (void *) INTERNAL_SYSCALL (brk, err, 1, addr);
+ void *newbrk = (void *) INTERNAL_SYSCALL_CALL (brk, addr);
__curbrk = newbrk;
if (newbrk < addr)
return INLINE_SYSCALL_ERROR_RETURN_VALUE (ENOMEM);
@@ -42,11 +42,9 @@ __fxstat (int vers, int fd, struct stat *buf)
{
struct stat64 buf64;
- INTERNAL_SYSCALL_DECL (err);
- result = INTERNAL_SYSCALL (fstat64, err, 2, fd, &buf64);
- if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result, err)))
- return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result,
- err));
+ result = INTERNAL_SYSCALL_CALL (fstat64, fd, &buf64);
+ if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result)))
+ return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result));
else
return __xstat32_conv (vers, &buf64, buf);
}
@@ -38,13 +38,11 @@ int
__fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
{
int result;
- INTERNAL_SYSCALL_DECL (err);
struct stat64 st64;
- result = INTERNAL_SYSCALL (fstatat64, err, 4, fd, file, &st64, flag);
- if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result, err)))
- return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result,
- err));
+ result = INTERNAL_SYSCALL_CALL (fstatat64, fd, file, &st64, flag);
+ if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result)))
+ return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result));
else
return __xstat32_conv (vers, &st64, st);
}
@@ -43,11 +43,9 @@ __lxstat (int vers, const char *name, struct stat *buf)
{
struct stat64 buf64;
- INTERNAL_SYSCALL_DECL (err);
- result = INTERNAL_SYSCALL (lstat64, err, 2, name, &buf64);
- if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result, err)))
- return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result,
- err));
+ result = INTERNAL_SYSCALL_CALL (lstat64, name, &buf64);
+ if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result)))
+ return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result));
else
return __xstat32_conv (vers, &buf64, buf);
}
@@ -299,25 +299,25 @@ struct libc_do_syscall_args
The _NCS variant allows non-constant syscall numbers but it is not
possible to use more than four parameters. */
#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL_MAIN_0(name, err, args...) \
- INTERNAL_SYSCALL_MAIN_INLINE(name, err, 0, args)
-#define INTERNAL_SYSCALL_MAIN_1(name, err, args...) \
- INTERNAL_SYSCALL_MAIN_INLINE(name, err, 1, args)
-#define INTERNAL_SYSCALL_MAIN_2(name, err, args...) \
- INTERNAL_SYSCALL_MAIN_INLINE(name, err, 2, args)
-#define INTERNAL_SYSCALL_MAIN_3(name, err, args...) \
- INTERNAL_SYSCALL_MAIN_INLINE(name, err, 3, args)
-#define INTERNAL_SYSCALL_MAIN_4(name, err, args...) \
- INTERNAL_SYSCALL_MAIN_INLINE(name, err, 4, args)
-#define INTERNAL_SYSCALL_MAIN_5(name, err, args...) \
- INTERNAL_SYSCALL_MAIN_INLINE(name, err, 5, args)
+#define INTERNAL_SYSCALL_MAIN_0(name, args...) \
+ INTERNAL_SYSCALL_MAIN_INLINE(name, 0, args)
+#define INTERNAL_SYSCALL_MAIN_1(name, args...) \
+ INTERNAL_SYSCALL_MAIN_INLINE(name, 1, args)
+#define INTERNAL_SYSCALL_MAIN_2(name, args...) \
+ INTERNAL_SYSCALL_MAIN_INLINE(name, 2, args)
+#define INTERNAL_SYSCALL_MAIN_3(name, args...) \
+ INTERNAL_SYSCALL_MAIN_INLINE(name, 3, args)
+#define INTERNAL_SYSCALL_MAIN_4(name, args...) \
+ INTERNAL_SYSCALL_MAIN_INLINE(name, 4, args)
+#define INTERNAL_SYSCALL_MAIN_5(name, args...) \
+ INTERNAL_SYSCALL_MAIN_INLINE(name, 5, args)
/* Each object using 6-argument inline syscalls must include a
definition of __libc_do_syscall. */
#ifdef OPTIMIZE_FOR_GCC_5
-# define INTERNAL_SYSCALL_MAIN_6(name, err, args...) \
- INTERNAL_SYSCALL_MAIN_INLINE(name, err, 6, args)
+# define INTERNAL_SYSCALL_MAIN_6(name, args...) \
+ INTERNAL_SYSCALL_MAIN_INLINE(name, 6, args)
#else /* GCC 5 */
-# define INTERNAL_SYSCALL_MAIN_6(name, err, arg1, arg2, arg3, \
+# define INTERNAL_SYSCALL_MAIN_6(name, arg1, arg2, arg3, \
arg4, arg5, arg6) \
struct libc_do_syscall_args _xv = \
{ \
@@ -332,22 +332,22 @@ struct libc_do_syscall_args
: "i" (__NR_##name), "c" (arg2), "d" (arg3), "S" (arg4), "D" (&_xv) \
: "memory", "cc")
#endif /* GCC 5 */
-#define INTERNAL_SYSCALL(name, err, nr, args...) \
+#define INTERNAL_SYSCALL(name, nr, args...) \
({ \
register unsigned int resultvar; \
- INTERNAL_SYSCALL_MAIN_##nr (name, err, args); \
+ INTERNAL_SYSCALL_MAIN_##nr (name, args); \
(int) resultvar; })
#if I386_USE_SYSENTER
# ifdef OPTIMIZE_FOR_GCC_5
# ifdef PIC
-# define INTERNAL_SYSCALL_MAIN_INLINE(name, err, nr, args...) \
+# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \
LOADREGS_##nr(args) \
asm volatile ( \
"call *%%gs:%P2" \
: "=a" (resultvar) \
: "a" (__NR_##name), "i" (offsetof (tcbhead_t, sysinfo)) \
ASMARGS_##nr(args) : "memory", "cc")
-# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+# define INTERNAL_SYSCALL_NCS(name, nr, args...) \
({ \
register unsigned int resultvar; \
LOADREGS_##nr(args) \
@@ -358,13 +358,13 @@ struct libc_do_syscall_args
ASMARGS_##nr(args) : "memory", "cc"); \
(int) resultvar; })
# else
-# define INTERNAL_SYSCALL_MAIN_INLINE(name, err, nr, args...) \
+# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \
LOADREGS_##nr(args) \
asm volatile ( \
"call *_dl_sysinfo" \
: "=a" (resultvar) \
: "a" (__NR_##name) ASMARGS_##nr(args) : "memory", "cc")
-# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+# define INTERNAL_SYSCALL_NCS(name, nr, args...) \
({ \
register unsigned int resultvar; \
LOADREGS_##nr(args) \
@@ -376,7 +376,7 @@ struct libc_do_syscall_args
# endif
# else /* GCC 5 */
# ifdef PIC
-# define INTERNAL_SYSCALL_MAIN_INLINE(name, err, nr, args...) \
+# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \
EXTRAVAR_##nr \
asm volatile ( \
LOADARGS_##nr \
@@ -386,7 +386,7 @@ struct libc_do_syscall_args
: "=a" (resultvar) \
: "i" (__NR_##name), "i" (offsetof (tcbhead_t, sysinfo)) \
ASMFMT_##nr(args) : "memory", "cc")
-# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+# define INTERNAL_SYSCALL_NCS(name, nr, args...) \
({ \
register unsigned int resultvar; \
EXTRAVAR_##nr \
@@ -399,7 +399,7 @@ struct libc_do_syscall_args
ASMFMT_##nr(args) : "memory", "cc"); \
(int) resultvar; })
# else
-# define INTERNAL_SYSCALL_MAIN_INLINE(name, err, nr, args...) \
+# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \
EXTRAVAR_##nr \
asm volatile ( \
LOADARGS_##nr \
@@ -408,7 +408,7 @@ struct libc_do_syscall_args
RESTOREARGS_##nr \
: "=a" (resultvar) \
: "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc")
-# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+# define INTERNAL_SYSCALL_NCS(name, nr, args...) \
({ \
register unsigned int resultvar; \
EXTRAVAR_##nr \
@@ -423,13 +423,13 @@ struct libc_do_syscall_args
# endif /* GCC 5 */
#else
# ifdef OPTIMIZE_FOR_GCC_5
-# define INTERNAL_SYSCALL_MAIN_INLINE(name, err, nr, args...) \
+# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \
LOADREGS_##nr(args) \
asm volatile ( \
"int $0x80" \
: "=a" (resultvar) \
: "a" (__NR_##name) ASMARGS_##nr(args) : "memory", "cc")
-# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+# define INTERNAL_SYSCALL_NCS(name, nr, args...) \
({ \
register unsigned int resultvar; \
LOADREGS_##nr(args) \
@@ -439,7 +439,7 @@ struct libc_do_syscall_args
: "a" (name) ASMARGS_##nr(args) : "memory", "cc"); \
(int) resultvar; })
# else /* GCC 5 */
-# define INTERNAL_SYSCALL_MAIN_INLINE(name, err, nr, args...) \
+# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \
EXTRAVAR_##nr \
asm volatile ( \
LOADARGS_##nr \
@@ -448,7 +448,7 @@ struct libc_do_syscall_args
RESTOREARGS_##nr \
: "=a" (resultvar) \
: "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc")
-# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+# define INTERNAL_SYSCALL_NCS(name, nr, args...) \
({ \
register unsigned int resultvar; \
EXTRAVAR_##nr \
@@ -43,11 +43,9 @@ __xstat (int vers, const char *name, struct stat *buf)
{
struct stat64 buf64;
- INTERNAL_SYSCALL_DECL (err);
- result = INTERNAL_SYSCALL (stat64, err, 2, name, &buf64);
- if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result, err)))
- return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result,
- err));
+ result = INTERNAL_SYSCALL_CALL (stat64, name, &buf64);
+ if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result)))
+ return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result));
else
return __xstat32_conv (vers, &buf64, buf);
}
@@ -112,8 +112,7 @@ __sigstack_longjmp (__jmp_buf buf, int val)
jb_sp = ((unsigned long *) buf)[JB_SP];
jb_bsp = ((unsigned long **) buf)[JB_BSP];
- INTERNAL_SYSCALL_DECL (err);
- (void) INTERNAL_SYSCALL (sigaltstack, err, 2, NULL, &stk);
+ INTERNAL_SYSCALL_CALL (sigaltstack, NULL, &stk);
ss_sp = (unsigned long) stk.ss_sp;
jb_rnat_addr = ia64_rse_rnat_addr (jb_bsp);
@@ -191,7 +191,7 @@
#ifdef IA64_USE_NEW_STUB
-# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+# define INTERNAL_SYSCALL_NCS(name, nr, args...) \
({ \
LOAD_ARGS_##nr (args) \
register long _r8 __asm ("r8"); \
@@ -214,7 +214,7 @@
#else /* !IA64_USE_NEW_STUB */
-# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+# define INTERNAL_SYSCALL_NCS(name, nr, args...) \
({ \
LOAD_ARGS_##nr (args) \
register long _r8 asm ("r8"); \
@@ -231,8 +231,8 @@
#endif /* !IA64_USE_NEW_STUB */
-#define INTERNAL_SYSCALL(name, err, nr, args...) \
- INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args)
+#define INTERNAL_SYSCALL(name, nr, args...) \
+ INTERNAL_SYSCALL_NCS (__NR_##name, nr, ##args)
#define LOAD_ARGS_0()
#define LOAD_REGS_0
@@ -244,8 +244,7 @@ void
__netlink_close (struct netlink_handle *h)
{
/* Don't modify errno. */
- INTERNAL_SYSCALL_DECL (err);
- (void) INTERNAL_SYSCALL (close, err, 1, h->fd);
+ INTERNAL_SYSCALL_CALL (close, h->fd);
}
@@ -62,8 +62,7 @@ static const sigset_t sigall_set = {
static inline void
__libc_signal_block_all (sigset_t *set)
{
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL_CALL (rt_sigprocmask, err, SIG_BLOCK, &sigall_set, set,
+ INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_BLOCK, &sigall_set, set,
_NSIG / 8);
}
@@ -73,8 +72,7 @@ __libc_signal_block_app (sigset_t *set)
{
sigset_t allset = sigall_set;
__clear_internal_signals (&allset);
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL_CALL (rt_sigprocmask, err, SIG_BLOCK, &allset, set,
+ INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_BLOCK, &allset, set,
_NSIG / 8);
}
@@ -82,8 +80,7 @@ __libc_signal_block_app (sigset_t *set)
static inline void
__libc_signal_restore_set (const sigset_t *set)
{
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL_CALL (rt_sigprocmask, err, SIG_SETMASK, set, NULL,
+ INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_SETMASK, set, NULL,
_NSIG / 8);
}
@@ -22,12 +22,11 @@
static bool
writev_for_fatal (int fd, const struct iovec *iov, size_t niov, size_t total)
{
- INTERNAL_SYSCALL_DECL (err);
ssize_t cnt;
do
- cnt = INTERNAL_SYSCALL (writev, err, 3, fd, iov, niov);
- while (INTERNAL_SYSCALL_ERROR_P (cnt, err)
- && INTERNAL_SYSCALL_ERRNO (cnt, err) == EINTR);
+ cnt = INTERNAL_SYSCALL_CALL (writev, fd, iov, niov);
+ while (INTERNAL_SYSCALL_ERROR_P (cnt)
+ && INTERNAL_SYSCALL_ERRNO (cnt) == EINTR);
return cnt == total;
}
#define WRITEV_FOR_FATAL writev_for_fatal
@@ -25,9 +25,8 @@
if ((unsigned long) (sp) < this_sp) \
{ \
stack_t oss; \
- INTERNAL_SYSCALL_DECL (err); \
- int result = INTERNAL_SYSCALL (sigaltstack, err, 2, NULL, &oss); \
- if (!INTERNAL_SYSCALL_ERROR_P (result, err) \
+ int result = INTERNAL_SYSCALL_CALL (sigaltstack, NULL, &oss); \
+ if (!INTERNAL_SYSCALL_ERROR_P (result) \
&& ((oss.ss_flags & SS_ONSTACK) == 0 \
|| ((unsigned long) oss.ss_sp + oss.ss_size \
- (unsigned long) (sp)) < oss.ss_size)) \
@@ -32,8 +32,7 @@ __brk (void *addr)
{
void *newbrk;
- INTERNAL_SYSCALL_DECL (err);
- newbrk = (void *) INTERNAL_SYSCALL (brk, err, 1, addr);
+ newbrk = (void *) INTERNAL_SYSCALL_CALL (brk, addr);
__curbrk = newbrk;
if (newbrk < addr)
@@ -61,6 +61,6 @@ typedef uintmax_t uatomic_max_t;
})
# define atomic_full_barrier() \
- (INTERNAL_SYSCALL (atomic_barrier, , 0), (void) 0)
+ (INTERNAL_SYSCALL_CALL (atomic_barrier), (void) 0)
#endif
@@ -36,10 +36,9 @@ __getpagesize (void)
return GLRO(dl_pagesize);
#ifdef __NR_getpagesize
- INTERNAL_SYSCALL_DECL (err);
- result = INTERNAL_SYSCALL (getpagesize, err, 0);
+ result = INTERNAL_SYSCALL_CALL (getpagesize);
/* The only possible error is ENOSYS. */
- if (!INTERNAL_SYSCALL_ERROR_P (result, err))
+ if (!INTERNAL_SYSCALL_ERROR_P (result))
return result;
#endif
@@ -21,6 +21,5 @@
void *
__m68k_read_tp (void)
{
- INTERNAL_SYSCALL_DECL (err);
- return (void*) INTERNAL_SYSCALL_CALL (get_thread_area, err);
+ return (void*) INTERNAL_SYSCALL_CALL (get_thread_area);
}
@@ -226,7 +226,7 @@ SYSCALL_ERROR_LABEL: \
normally. It will never touch errno. This returns just what the kernel
gave back. */
#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+#define INTERNAL_SYSCALL_NCS(name, nr, args...) \
({ unsigned int _sys_result; \
{ \
/* Load argument values in temporary variables
@@ -242,8 +242,8 @@ SYSCALL_ERROR_LABEL: \
_sys_result = _d0; \
} \
(int) _sys_result; })
-#define INTERNAL_SYSCALL(name, err, nr, args...) \
- INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args)
+#define INTERNAL_SYSCALL(name, nr, args...) \
+ INTERNAL_SYSCALL_NCS (__NR_##name, nr, ##args)
#define LOAD_ARGS_0()
#define LOAD_REGS_0
@@ -30,9 +30,7 @@ weak_alias (__curbrk, ___brk_addr)
int
__brk (void *addr)
{
- INTERNAL_SYSCALL_DECL (err);
-
- __curbrk = (void *) INTERNAL_SYSCALL (brk, err, 1, addr);
+ __curbrk = (void *) INTERNAL_SYSCALL_CALL (brk, addr);
if (__curbrk < addr)
{
__set_errno (ENOMEM);
@@ -168,11 +168,11 @@ SYSCALL_ERROR_LABEL_DCL: \
normally. It will never touch errno. This returns just what the kernel
gave back. */
# undef INTERNAL_SYSCALL
-# define INTERNAL_SYSCALL(name, err, nr, args...) \
+# define INTERNAL_SYSCALL(name, nr, args...) \
inline_syscall##nr(SYS_ify(name), args)
# undef INTERNAL_SYSCALL_NCS
-# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+# define INTERNAL_SYSCALL_NCS(name, nr, args...) \
inline_syscall##nr(name, args)
# define SYSCALL_CLOBBERS_6 "r11", "r4", "memory"
@@ -30,10 +30,9 @@ weak_alias (__curbrk, ___brk_addr)
int
__brk (void *addr)
{
- INTERNAL_SYSCALL_DECL (err);
void *newbrk;
- newbrk = (void *) INTERNAL_SYSCALL (brk, err, 1, addr);
+ newbrk = (void *) INTERNAL_SYSCALL_CALL (brk, addr);
__curbrk = newbrk;
if (newbrk < addr)
@@ -37,6 +37,7 @@
/* We don't want the label for the error handler to be visible in the symbol
table when we define it here. */
#ifdef __PIC__
+# undef SYSCALL_ERROR_LABEL
# define SYSCALL_ERROR_LABEL 99b
#endif
@@ -94,10 +95,10 @@ union __mips_syscall_return
# include <mips16-syscall.h>
-# define INTERNAL_SYSCALL(name, err, nr, args...) \
- INTERNAL_SYSCALL_NCS (SYS_ify (name), err, nr, args)
+# define INTERNAL_SYSCALL(name, nr, args...) \
+ INTERNAL_SYSCALL_NCS (SYS_ify (name), nr, args)
-# define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
+# define INTERNAL_SYSCALL_NCS(number, nr, args...) \
({ \
union __mips_syscall_return _sc_ret; \
_sc_ret.val = __mips16_syscall##nr (args, number); \
@@ -110,12 +111,12 @@ union __mips_syscall_return
number, err, args)
#else /* !__mips16 */
-# define INTERNAL_SYSCALL(name, err, nr, args...) \
+# define INTERNAL_SYSCALL(name, nr, args...) \
internal_syscall##nr ("li\t%0, %2\t\t\t# " #name "\n\t", \
"IK" (SYS_ify (name)), \
SYS_ify (name), err, args)
-# define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
+# define INTERNAL_SYSCALL_NCS(number, nr, args...) \
internal_syscall##nr (MOVE32 "\t%0, %2\n\t", \
"r" (__s0), \
number, err, args)
@@ -40,15 +40,14 @@ __fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
}
int result;
- INTERNAL_SYSCALL_DECL (err);
struct kernel_stat kst;
- result = INTERNAL_SYSCALL (newfstatat, err, 4, fd, file, &kst, flag);
- if (!__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ result = INTERNAL_SYSCALL_CALL (newfstatat, fd, file, &kst, flag);
+ if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result)))
return __xstat64_conv (vers, &kst, st);
else
{
- __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result));
return -1;
}
}
@@ -36,6 +36,7 @@
/* We don't want the label for the error handler to be visible in the symbol
table when we define it here. */
+# undef SYSCALL_ERROR_LABEL
# define SYSCALL_ERROR_LABEL 99b
#else /* ! __ASSEMBLER__ */
@@ -78,18 +79,18 @@ typedef long int __syscall_arg_t;
#endif
#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...) \
+#define INTERNAL_SYSCALL(name, nr, args...) \
internal_syscall##nr ("li\t%0, %2\t\t\t# " #name "\n\t", \
"IK" (SYS_ify (name)), \
- 0, err, args)
+ 0, args)
#undef INTERNAL_SYSCALL_NCS
-#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
+#define INTERNAL_SYSCALL_NCS(number, nr, args...) \
internal_syscall##nr (MOVE32 "\t%0, %2\n\t", \
"r" (__s0), \
- number, err, args)
+ number, args)
-#define internal_syscall0(v0_init, input, number, err, dummy...) \
+#define internal_syscall0(v0_init, input, number, dummy...) \
({ \
long _sys_result; \
\
@@ -111,7 +112,7 @@ typedef long int __syscall_arg_t;
_sys_result; \
})
-#define internal_syscall1(v0_init, input, number, err, arg1) \
+#define internal_syscall1(v0_init, input, number, arg1) \
({ \
long _sys_result; \
\
@@ -134,7 +135,7 @@ typedef long int __syscall_arg_t;
_sys_result; \
})
-#define internal_syscall2(v0_init, input, number, err, arg1, arg2) \
+#define internal_syscall2(v0_init, input, number, arg1, arg2) \
({ \
long _sys_result; \
\
@@ -158,8 +159,7 @@ typedef long int __syscall_arg_t;
_sys_result; \
})
-#define internal_syscall3(v0_init, input, number, err, \
- arg1, arg2, arg3) \
+#define internal_syscall3(v0_init, input, number, arg1, arg2, arg3) \
({ \
long _sys_result; \
\
@@ -184,8 +184,8 @@ typedef long int __syscall_arg_t;
_sys_result; \
})
-#define internal_syscall4(v0_init, input, number, err, \
- arg1, arg2, arg3, arg4) \
+#define internal_syscall4(v0_init, input, number, arg1, arg2, arg3, \
+ arg4) \
({ \
long _sys_result; \
\
@@ -210,8 +210,8 @@ typedef long int __syscall_arg_t;
_sys_result; \
})
-#define internal_syscall5(v0_init, input, number, err, \
- arg1, arg2, arg3, arg4, arg5) \
+#define internal_syscall5(v0_init, input, number, arg1, arg2, arg3, \
+ arg4, arg5) \
({ \
long _sys_result; \
\
@@ -237,8 +237,8 @@ typedef long int __syscall_arg_t;
_sys_result; \
})
-#define internal_syscall6(v0_init, input, number, err, \
- arg1, arg2, arg3, arg4, arg5, arg6) \
+#define internal_syscall6(v0_init, input, number, arg1, arg2, arg3, \
+ arg4, arg5, arg6) \
({ \
long _sys_result; \
\
@@ -28,14 +28,13 @@ mq_unlink (const char *name)
if (name[0] != '/')
return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
- INTERNAL_SYSCALL_DECL (err);
- int ret = INTERNAL_SYSCALL (mq_unlink, err, 1, name + 1);
+ int ret = INTERNAL_SYSCALL_CALL (mq_unlink, name + 1);
/* While unlink can return either EPERM or EACCES, mq_unlink should
return just EACCES. */
- if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (ret, err)))
+ if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (ret)))
{
- ret = INTERNAL_SYSCALL_ERRNO (ret, err);
+ ret = INTERNAL_SYSCALL_ERRNO (ret);
if (ret == EPERM)
ret = EACCES;
return INLINE_SYSCALL_ERROR_RETURN_VALUE (ret);
@@ -145,7 +145,7 @@
# undef HAVE_INTERNAL_SEND_SYMBOL
#undef INTERNAL_SYSCALL_RAW
-#define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \
+#define INTERNAL_SYSCALL_RAW(name, nr, args...) \
({ unsigned int _sys_result; \
{ \
/* Load argument values in temporary variables
@@ -164,12 +164,12 @@
(int) _sys_result; })
#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...) \
- INTERNAL_SYSCALL_RAW(SYS_ify(name), err, nr, args)
+#define INTERNAL_SYSCALL(name, nr, args...) \
+ INTERNAL_SYSCALL_RAW(SYS_ify(name), nr, args)
#undef INTERNAL_SYSCALL_NCS
-#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
- INTERNAL_SYSCALL_RAW(number, err, nr, args)
+#define INTERNAL_SYSCALL_NCS(number, nr, args...) \
+ INTERNAL_SYSCALL_RAW(number, nr, args)
#define LOAD_ARGS_0()
#define LOAD_REGS_0
@@ -65,8 +65,7 @@ __close_nocancel_nostatus (int fd)
static inline void
__writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt)
{
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL_CALL (writev, err, fd, iov, iovcnt);
+ INTERNAL_SYSCALL_CALL (writev, fd, iov, iovcnt);
}
/* Uncancelable fcntl. */
@@ -26,14 +26,13 @@ static inline int
__access_noerrno (const char *pathname, int mode)
{
int res;
- INTERNAL_SYSCALL_DECL (err);
#ifdef __NR_access
- res = INTERNAL_SYSCALL_CALL (access, err, pathname, mode);
+ res = INTERNAL_SYSCALL_CALL (access, pathname, mode);
#else
- res = INTERNAL_SYSCALL_CALL (faccessat, err, AT_FDCWD, pathname, mode);
+ res = INTERNAL_SYSCALL_CALL (faccessat, AT_FDCWD, pathname, mode);
#endif
- if (INTERNAL_SYSCALL_ERROR_P (res, err))
- return INTERNAL_SYSCALL_ERRNO (res, err);
+ if (INTERNAL_SYSCALL_ERROR_P (res))
+ return INTERNAL_SYSCALL_ERRNO (res);
return 0;
}
@@ -41,9 +40,8 @@ static inline int
__kill_noerrno (pid_t pid, int sig)
{
int res;
- INTERNAL_SYSCALL_DECL (err);
- res = INTERNAL_SYSCALL_CALL (kill, err, pid, sig);
- if (INTERNAL_SYSCALL_ERROR_P (res, err))
- return INTERNAL_SYSCALL_ERRNO (res, err);
+ res = INTERNAL_SYSCALL_CALL (kill, pid, sig);
+ if (INTERNAL_SYSCALL_ERROR_P (res))
+ return INTERNAL_SYSCALL_ERRNO (res);
return 0;
}
@@ -35,10 +35,9 @@ setup_thread (struct database_dyn *db)
/* Do not try this at home, kids. We play with the SETTID address
even thought the process is multi-threaded. This can only work
since none of the threads ever terminates. */
- INTERNAL_SYSCALL_DECL (err);
- int r = INTERNAL_SYSCALL (set_tid_address, err, 1,
- &db->head->nscd_certainly_running);
- if (!INTERNAL_SYSCALL_ERROR_P (r, err))
+ int r = INTERNAL_SYSCALL_CALL (set_tid_address,
+ &db->head->nscd_certainly_running);
+ if (!INTERNAL_SYSCALL_ERROR_P (r))
/* We know the kernel can reset this field when nscd terminates.
So, set the field to a nonzero value which indicates that nscd
is certainly running and clients can skip the test. */
@@ -35,15 +35,14 @@ __personality (unsigned long persona)
persona = (unsigned int) persona;
#endif
- INTERNAL_SYSCALL_DECL (err);
- long ret = INTERNAL_SYSCALL (personality, err, 1, persona);
+ long ret = INTERNAL_SYSCALL_CALL (personality, persona);
/* Starting with kernel commit v2.6.29-6609-g11d06b2, the personality syscall
never fails. However, 32-bit kernels might flag valid values as errors, so
we need to reverse the error setting. We can't use the raw result as some
arches split the return/error values. */
- if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (ret, err)))
- ret = -INTERNAL_SYSCALL_ERRNO (ret, err);
+ if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (ret)))
+ ret = -INTERNAL_SYSCALL_ERRNO (ret);
return ret;
}
weak_alias (__personality, personality)
@@ -41,14 +41,13 @@
int
posix_fadvise (int fd, off_t offset, off_t len, int advise)
{
- INTERNAL_SYSCALL_DECL (err);
# if defined (__NR_fadvise64) && !defined (__ASSUME_FADVISE64_AS_64_64)
- int ret = INTERNAL_SYSCALL_CALL (fadvise64, err, fd,
+ int ret = INTERNAL_SYSCALL_CALL (fadvise64, fd,
__ALIGNMENT_ARG SYSCALL_LL (offset),
len, advise);
# else
# ifdef __ASSUME_FADVISE64_64_6ARG
- int ret = INTERNAL_SYSCALL_CALL (fadvise64_64, err, fd, advise,
+ int ret = INTERNAL_SYSCALL_CALL (fadvise64_64, fd, advise,
SYSCALL_LL (offset), SYSCALL_LL (len));
# else
@@ -56,13 +55,13 @@ posix_fadvise (int fd, off_t offset, off_t len, int advise)
# define __NR_fadvise64_64 __NR_fadvise64
# endif
- int ret = INTERNAL_SYSCALL_CALL (fadvise64_64, err, fd,
+ int ret = INTERNAL_SYSCALL_CALL (fadvise64_64, fd,
__ALIGNMENT_ARG SYSCALL_LL (offset),
SYSCALL_LL (len), advise);
# endif
# endif
- if (INTERNAL_SYSCALL_ERROR_P (ret, err))
- return INTERNAL_SYSCALL_ERRNO (ret, err);
+ if (INTERNAL_SYSCALL_ERROR_P (ret))
+ return INTERNAL_SYSCALL_ERRNO (ret);
return 0;
}
#endif /* __OFF_T_MATCHES_OFF64_T */
@@ -40,18 +40,17 @@ libc_hidden_proto (__posix_fadvise64_l64)
int
__posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise)
{
- INTERNAL_SYSCALL_DECL (err);
#ifdef __ASSUME_FADVISE64_64_6ARG
- int ret = INTERNAL_SYSCALL_CALL (fadvise64_64, err, fd, advise,
+ int ret = INTERNAL_SYSCALL_CALL (fadvise64_64, fd, advise,
SYSCALL_LL64 (offset), SYSCALL_LL64 (len));
#else
- int ret = INTERNAL_SYSCALL_CALL (fadvise64_64, err, fd,
+ int ret = INTERNAL_SYSCALL_CALL (fadvise64_64, fd,
__ALIGNMENT_ARG SYSCALL_LL64 (offset),
SYSCALL_LL64 (len), advise);
#endif
- if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
+ if (!INTERNAL_SYSCALL_ERROR_P (ret))
return 0;
- return INTERNAL_SYSCALL_ERRNO (ret, err);
+ return INTERNAL_SYSCALL_ERRNO (ret);
}
/* The type of the len argument was changed from size_t to off_t in
@@ -26,12 +26,11 @@
int
posix_fallocate (int fd, __off_t offset, __off_t len)
{
- INTERNAL_SYSCALL_DECL (err);
- int res = INTERNAL_SYSCALL_CALL (fallocate, err, fd, 0,
+ int res = INTERNAL_SYSCALL_CALL (fallocate, fd, 0,
SYSCALL_LL (offset), SYSCALL_LL (len));
- if (! INTERNAL_SYSCALL_ERROR_P (res, err))
+ if (! INTERNAL_SYSCALL_ERROR_P (res))
return 0;
- if (INTERNAL_SYSCALL_ERRNO (res, err) != EOPNOTSUPP)
- return INTERNAL_SYSCALL_ERRNO (res, err);
+ if (INTERNAL_SYSCALL_ERRNO (res) != EOPNOTSUPP)
+ return INTERNAL_SYSCALL_ERRNO (res);
return internal_fallocate (fd, offset, len);
}
@@ -28,19 +28,12 @@ libc_hidden_proto (__posix_fallocate64_l64)
int
__posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len)
{
- INTERNAL_SYSCALL_DECL (err);
-#ifdef INTERNAL_SYSCALL_TYPES
- int res = INTERNAL_SYSCALL_TYPES (fallocate, err, 4, int, fd,
- int, 0, off_t, offset,
- off_t, len);
-#else
- int res = INTERNAL_SYSCALL_CALL (fallocate, err, fd, 0,
+ int res = INTERNAL_SYSCALL_CALL (fallocate, fd, 0,
SYSCALL_LL64 (offset), SYSCALL_LL64 (len));
-#endif
- if (! INTERNAL_SYSCALL_ERROR_P (res, err))
+ if (! INTERNAL_SYSCALL_ERROR_P (res))
return 0;
- if (INTERNAL_SYSCALL_ERRNO (res, err) != EOPNOTSUPP)
- return INTERNAL_SYSCALL_ERRNO (res, err);
+ if (INTERNAL_SYSCALL_ERRNO (res) != EOPNOTSUPP)
+ return INTERNAL_SYSCALL_ERRNO (res);
return internal_fallocate64 (fd, offset, len);
}
libc_hidden_def (__posix_fallocate64_l64)
@@ -31,7 +31,6 @@ posix_madvise (void *addr, size_t len, int advice)
if (advice == POSIX_MADV_DONTNEED)
return 0;
- INTERNAL_SYSCALL_DECL (err);
- int result = INTERNAL_SYSCALL (madvise, err, 3, addr, len, advice);
- return INTERNAL_SYSCALL_ERRNO (result, err);
+ int result = INTERNAL_SYSCALL_CALL (madvise, addr, len, advice);
+ return INTERNAL_SYSCALL_ERRNO (result);
}
@@ -105,7 +105,6 @@ __get_timebase_freq (void)
if (vdsop == NULL)
return get_timebase_freq_fallback ();
- INTERNAL_SYSCALL_DECL (err);
- return INTERNAL_VSYSCALL_CALL_TYPE (vdsop, err, uint64_t, 0);
+ return INTERNAL_VSYSCALL_CALL_TYPE (vdsop, uint64_t, 0);
}
weak_alias (__get_timebase_freq, __ppc_get_timebase_freq)
@@ -26,8 +26,7 @@
const fenv_t *
__fe_mask_env (void)
{
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL (prctl, err, 2, PR_SET_FPEXC, PR_FP_EXC_DISABLED);
+ INTERNAL_SYSCALL_CALL (prctl, PR_SET_FPEXC, PR_FP_EXC_DISABLED);
return FE_DFL_ENV;
}
@@ -27,8 +27,7 @@
const fenv_t *
__fe_nomask_env_priv (void)
{
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL (prctl, err, 2, PR_SET_FPEXC, PR_FP_EXC_PRECISE);
+ INTERNAL_SYSCALL_CALL (prctl, PR_SET_FPEXC, PR_FP_EXC_PRECISE);
return FE_ENABLED_ENV;
}
@@ -26,8 +26,7 @@ const fenv_t *
__fe_mask_env (void)
{
#if defined PR_SET_FPEXC && defined PR_FP_EXC_DISABLED
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL (prctl, err, 2, PR_SET_FPEXC, PR_FP_EXC_DISABLED);
+ INTERNAL_SYSCALL_CALL (prctl, PR_SET_FPEXC, PR_FP_EXC_DISABLED);
#else
__set_errno (ENOSYS);
#endif
@@ -27,8 +27,7 @@ const fenv_t *
__fe_nomask_env_priv (void)
{
#if defined PR_SET_FPEXC && defined PR_FP_EXC_PRECISE
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL (prctl, err, 2, PR_SET_FPEXC, PR_FP_EXC_PRECISE);
+ INTERNAL_SYSCALL_CALL (prctl, PR_SET_FPEXC, PR_FP_EXC_PRECISE);
#else
__set_errno (ENOSYS);
#endif
@@ -41,7 +41,7 @@
gave back in the non-error (CR0.SO cleared) case, otherwise (CR0.SO set)
the negation of the return value in the kernel gets reverted. */
-#define INTERNAL_VSYSCALL_CALL_TYPE(funcptr, err, type, nr, args...) \
+#define INTERNAL_VSYSCALL_CALL_TYPE(funcptr, type, nr, args...) \
({ \
register void *r0 __asm__ ("r0"); \
register long int r3 __asm__ ("r3"); \
@@ -64,12 +64,12 @@
(long int) r0 & (1 << 28) ? -rval : rval; \
})
-#define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \
- INTERNAL_VSYSCALL_CALL_TYPE(funcptr, err, long int, nr, args)
+#define INTERNAL_VSYSCALL_CALL(funcptr, nr, args...) \
+ INTERNAL_VSYSCALL_CALL_TYPE(funcptr, long int, nr, args)
#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+#define INTERNAL_SYSCALL_NCS(name, nr, args...) \
({ \
register long int r0 __asm__ ("r0"); \
register long int r3 __asm__ ("r3"); \
@@ -91,8 +91,8 @@
"cr0", "ctr", "memory"); \
r0 & (1 << 28) ? -r3 : r3; \
})
-#define INTERNAL_SYSCALL(name, err, nr, args...) \
- INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, args)
+#define INTERNAL_SYSCALL(name, nr, args...) \
+ INTERNAL_SYSCALL_NCS (__NR_##name, nr, args)
#if defined(__PPC64__) || defined(__powerpc64__)
# define SYSCALL_ARG_SIZE 8
@@ -25,6 +25,5 @@
static inline void
__pthread_initialize_pids (struct pthread *pd)
{
- INTERNAL_SYSCALL_DECL (err);
- pd->tid = INTERNAL_SYSCALL_CALL (set_tid_address, err, &pd->tid);
+ pd->tid = INTERNAL_SYSCALL_CALL (set_tid_address, &pd->tid);
}
@@ -31,11 +31,10 @@ __pthread_getaffinity_new (pthread_t th, size_t cpusetsize, cpu_set_t *cpuset)
{
const struct pthread *pd = (const struct pthread *) th;
- INTERNAL_SYSCALL_DECL (err);
- int res = INTERNAL_SYSCALL (sched_getaffinity, err, 3, pd->tid,
- MIN (INT_MAX, cpusetsize), cpuset);
- if (INTERNAL_SYSCALL_ERROR_P (res, err))
- return INTERNAL_SYSCALL_ERRNO (res, err);
+ int res = INTERNAL_SYSCALL_CALL (sched_getaffinity, pd->tid,
+ MIN (INT_MAX, cpusetsize), cpuset);
+ if (INTERNAL_SYSCALL_ERROR_P (res))
+ return INTERNAL_SYSCALL_ERRNO (res);
/* Clean the rest of the memory the kernel didn't do. */
memset ((char *) cpuset + res, '\0', cpusetsize - res);
@@ -48,12 +48,10 @@ __pthread_kill (pthread_t threadid, int signo)
return EINVAL;
/* We have a special syscall to do the work. */
- INTERNAL_SYSCALL_DECL (err);
-
pid_t pid = __getpid ();
- int val = INTERNAL_SYSCALL_CALL (tgkill, err, pid, tid, signo);
- return (INTERNAL_SYSCALL_ERROR_P (val, err)
- ? INTERNAL_SYSCALL_ERRNO (val, err) : 0);
+ int val = INTERNAL_SYSCALL_CALL (tgkill, pid, tid, signo);
+ return (INTERNAL_SYSCALL_ERROR_P (val)
+ ? INTERNAL_SYSCALL_ERRNO (val) : 0);
}
strong_alias (__pthread_kill, pthread_kill)
@@ -28,19 +28,18 @@ __pthread_setaffinity_new (pthread_t th, size_t cpusetsize,
const cpu_set_t *cpuset)
{
const struct pthread *pd = (const struct pthread *) th;
- INTERNAL_SYSCALL_DECL (err);
int res;
- res = INTERNAL_SYSCALL (sched_setaffinity, err, 3, pd->tid, cpusetsize,
- cpuset);
+ res = INTERNAL_SYSCALL_CALL (sched_setaffinity, pd->tid, cpusetsize,
+ cpuset);
#ifdef RESET_VGETCPU_CACHE
- if (!INTERNAL_SYSCALL_ERROR_P (res, err))
+ if (!INTERNAL_SYSCALL_ERROR_P (res))
RESET_VGETCPU_CACHE ();
#endif
- return (INTERNAL_SYSCALL_ERROR_P (res, err)
- ? INTERNAL_SYSCALL_ERRNO (res, err)
+ return (INTERNAL_SYSCALL_ERROR_P (res)
+ ? INTERNAL_SYSCALL_ERRNO (res)
: 0);
}
versioned_symbol (libpthread, __pthread_setaffinity_new,
@@ -61,12 +61,10 @@ pthread_sigqueue (pthread_t threadid, int signo, const union sigval value)
info.si_value = value;
/* We have a special syscall to do the work. */
- INTERNAL_SYSCALL_DECL (err);
-
- int val = INTERNAL_SYSCALL_CALL (rt_tgsigqueueinfo, err, pid, tid, signo,
+ int val = INTERNAL_SYSCALL_CALL (rt_tgsigqueueinfo, pid, tid, signo,
&info);
- return (INTERNAL_SYSCALL_ERROR_P (val, err)
- ? INTERNAL_SYSCALL_ERRNO (val, err) : 0);
+ return (INTERNAL_SYSCALL_ERROR_P (val)
+ ? INTERNAL_SYSCALL_ERRNO (val) : 0);
#else
return ENOSYS;
#endif
@@ -39,11 +39,10 @@ raise (int sig)
sigset_t set;
__libc_signal_block_app (&set);
- INTERNAL_SYSCALL_DECL (err);
- pid_t pid = INTERNAL_SYSCALL (getpid, err, 0);
- pid_t tid = INTERNAL_SYSCALL (gettid, err, 0);
+ pid_t pid = INTERNAL_SYSCALL_CALL (getpid);
+ pid_t tid = INTERNAL_SYSCALL_CALL (gettid);
- int ret = INLINE_SYSCALL (tgkill, 3, pid, tid, sig);
+ int ret = INLINE_SYSCALL_CALL (tgkill, pid, tid, sig);
__libc_signal_restore_set (&set);
@@ -23,12 +23,11 @@ syscall (long int syscall_number, long int arg1, long int arg2, long int arg3,
long int arg4, long int arg5, long int arg6, long int arg7)
{
long int ret;
- INTERNAL_SYSCALL_DECL (err);
- ret = INTERNAL_SYSCALL_NCS (syscall_number, err, 7, arg1, arg2, arg3, arg4,
+ ret = INTERNAL_SYSCALL_NCS (syscall_number, 7, arg1, arg2, arg3, arg4,
arg5, arg6, arg7);
- if (INTERNAL_SYSCALL_ERROR_P (ret, err))
+ if (INTERNAL_SYSCALL_ERROR_P (ret))
return __syscall_error (ret);
return ret;
@@ -130,13 +130,13 @@
# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday"
# define HAVE_GETCPU_VSYSCALL "__vdso_getcpu"
-# define INTERNAL_SYSCALL(name, err, nr, args...) \
- internal_syscall##nr (SYS_ify (name), err, args)
+# define INTERNAL_SYSCALL(name, nr, args...) \
+ internal_syscall##nr (SYS_ify (name), args)
-# define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
- internal_syscall##nr (number, err, args)
+# define INTERNAL_SYSCALL_NCS(number, nr, args...) \
+ internal_syscall##nr (number, args)
-# define internal_syscall0(number, err, dummy...) \
+# define internal_syscall0(number, dummy...) \
({ \
long int _sys_result; \
\
@@ -153,7 +153,7 @@
_sys_result; \
})
-# define internal_syscall1(number, err, arg0) \
+# define internal_syscall1(number, arg0) \
({ \
long int _sys_result; \
long int _arg0 = (long int) (arg0); \
@@ -171,7 +171,7 @@
_sys_result; \
})
-# define internal_syscall2(number, err, arg0, arg1) \
+# define internal_syscall2(number, arg0, arg1) \
({ \
long int _sys_result; \
long int _arg0 = (long int) (arg0); \
@@ -191,7 +191,7 @@
_sys_result; \
})
-# define internal_syscall3(number, err, arg0, arg1, arg2) \
+# define internal_syscall3(number, arg0, arg1, arg2) \
({ \
long int _sys_result; \
long int _arg0 = (long int) (arg0); \
@@ -213,7 +213,7 @@
_sys_result; \
})
-# define internal_syscall4(number, err, arg0, arg1, arg2, arg3) \
+# define internal_syscall4(number, arg0, arg1, arg2, arg3) \
({ \
long int _sys_result; \
long int _arg0 = (long int) (arg0); \
@@ -237,7 +237,7 @@
_sys_result; \
})
-# define internal_syscall5(number, err, arg0, arg1, arg2, arg3, arg4) \
+# define internal_syscall5(number, arg0, arg1, arg2, arg3, arg4) \
({ \
long int _sys_result; \
long int _arg0 = (long int) (arg0); \
@@ -263,7 +263,7 @@
_sys_result; \
})
-# define internal_syscall6(number, err, arg0, arg1, arg2, arg3, arg4, arg5) \
+# define internal_syscall6(number, arg0, arg1, arg2, arg3, arg4, arg5) \
({ \
long int _sys_result; \
long int _arg0 = (long int) (arg0); \
@@ -292,7 +292,7 @@
_sys_result; \
})
-# define internal_syscall7(number, err, arg0, arg1, arg2, arg3, arg4, arg5, arg6) \
+# define internal_syscall7(number, arg0, arg1, arg2, arg3, arg4, arg5, arg6) \
({ \
long int _sys_result; \
long int _arg0 = (long int) (arg0); \
@@ -39,9 +39,8 @@
if (new_sp < cur_sp) \
{ \
stack_t oss; \
- INTERNAL_SYSCALL_DECL (err); \
- int res = INTERNAL_SYSCALL (sigaltstack, err, 2, NULL, &oss); \
- if (!INTERNAL_SYSCALL_ERROR_P (res, err)) \
+ int res = INTERNAL_SYSCALL_CALL (sigaltstack, NULL, &oss); \
+ if (!INTERNAL_SYSCALL_ERROR_P (res)) \
{ \
if ((oss.ss_flags & SS_ONSTACK) == 0 \
|| ((uintptr_t) (oss.ss_sp + oss.ss_size) - new_sp \
@@ -37,16 +37,15 @@ int
__posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise)
{
struct fadvise64_64_layout parameters;
- INTERNAL_SYSCALL_DECL (err);
parameters.fd = fd;
parameters.offset = offset;
parameters.len = len;
parameters.advise = advise;
- int ret = INTERNAL_SYSCALL (fadvise64_64, err, 1, ¶meters);
- if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
+ int ret = INTERNAL_SYSCALL_CALL (fadvise64_64, ¶meters);
+ if (!INTERNAL_SYSCALL_ERROR_P (ret))
return 0;
- return INTERNAL_SYSCALL_ERRNO (ret, err);
+ return INTERNAL_SYSCALL_ERRNO (ret);
}
#include <shlib-compat.h>
@@ -81,6 +81,7 @@
END (name)
#ifndef PIC
+# undef SYSCALL_ERROR_LABEL
# define SYSCALL_ERROR_LABEL 0f
# define SYSCALL_ERROR_HANDLER \
0: basr %r1,0; \
@@ -89,6 +90,7 @@
2: .long syscall_error
#else
# if RTLD_PRIVATE_ERRNO
+# undef SYSCALL_ERROR_LABEL
# define SYSCALL_ERROR_LABEL 0f
# define SYSCALL_ERROR_HANDLER \
0: basr %r1,0; \
@@ -104,6 +106,7 @@
# else
# define SYSCALL_ERROR_ERRNO errno
# endif
+# undef SYSCALL_ERROR_LABEL
# define SYSCALL_ERROR_LABEL 0f
# define SYSCALL_ERROR_HANDLER \
0: lcr %r0,%r2; \
@@ -116,6 +119,7 @@
br %r14; \
2: .long _GLOBAL_OFFSET_TABLE_-1b
# else
+# undef SYSCALL_ERROR_LABEL
# define SYSCALL_ERROR_LABEL 0f
# define SYSCALL_ERROR_HANDLER \
0: basr %r1,0; \
@@ -39,9 +39,8 @@
if (new_sp < cur_sp) \
{ \
stack_t oss; \
- INTERNAL_SYSCALL_DECL (err); \
- int res = INTERNAL_SYSCALL (sigaltstack, err, 2, NULL, &oss); \
- if (!INTERNAL_SYSCALL_ERROR_P (res, err)) \
+ int res = INTERNAL_SYSCALL_CALL (sigaltstack, NULL, &oss); \
+ if (!INTERNAL_SYSCALL_ERROR_P (res)) \
{ \
if ((oss.ss_flags & SS_ONSTACK) == 0 \
|| ((uintptr_t) (oss.ss_sp + oss.ss_size) - new_sp \
@@ -95,10 +95,12 @@
END (name)
#ifndef PIC
+# undef SYSCALL_ERROR_LABEL
# define SYSCALL_ERROR_LABEL syscall_error
# define SYSCALL_ERROR_HANDLER
#else
# if RTLD_PRIVATE_ERRNO
+# undef SYSCALL_ERROR_LABEL
# define SYSCALL_ERROR_LABEL 0f
# define SYSCALL_ERROR_HANDLER \
0: larl %r1,rtld_errno; \
@@ -112,6 +114,7 @@
# else
# define SYSCALL_ERROR_ERRNO errno
# endif
+# undef SYSCALL_ERROR_LABEL
# define SYSCALL_ERROR_LABEL 0f
# define SYSCALL_ERROR_HANDLER \
0: lcr %r0,%r2; \
@@ -124,6 +127,7 @@
lghi %r2,-1; \
br %r14
# else
+# undef SYSCALL_ERROR_LABEL
# define SYSCALL_ERROR_LABEL 0f
# define SYSCALL_ERROR_HANDLER \
0: larl %r1,_GLOBAL_OFFSET_TABLE_; \
@@ -22,7 +22,7 @@
#define SYS_ify(syscall_name) __NR_##syscall_name
#undef INTERNAL_SYSCALL_DIRECT
-#define INTERNAL_SYSCALL_DIRECT(name, err, nr, args...) \
+#define INTERNAL_SYSCALL_DIRECT(name, nr, args...) \
({ \
DECLARGS_##nr(args) \
register long _ret __asm__("2"); \
@@ -34,7 +34,7 @@
_ret; })
#undef INTERNAL_SYSCALL_SVC0
-#define INTERNAL_SYSCALL_SVC0(name, err, nr, args...) \
+#define INTERNAL_SYSCALL_SVC0(name, nr, args...) \
({ \
DECLARGS_##nr(args) \
register unsigned long _nr __asm__("1") = (unsigned long)(__NR_##name); \
@@ -47,7 +47,7 @@
_ret; })
#undef INTERNAL_SYSCALL_NCS
-#define INTERNAL_SYSCALL_NCS(no, err, nr, args...) \
+#define INTERNAL_SYSCALL_NCS(no, nr, args...) \
({ \
DECLARGS_##nr(args) \
register unsigned long _nr __asm__("1") = (unsigned long)(no); \
@@ -25,9 +25,8 @@
static inline void
__safe_fatal (void)
{
- INTERNAL_SYSCALL_DECL (err);
- pid_t self = INTERNAL_SYSCALL (getpid, err, 0);
- INTERNAL_SYSCALL (kill, err, 2, self, SIGKILL);
+ pid_t self = INTERNAL_SYSCALL_CALL (getpid);
+ INTERNAL_SYSCALL_CALL (kill, self, SIGKILL);
}
#endif /* safe-fatal.h */
@@ -288,7 +288,7 @@
register long int r2 asm ("%r2") = (long int) (_arg7)
#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...) \
+#define INTERNAL_SYSCALL(name, nr, args...) \
({ \
unsigned long int resultvar; \
register long int r3 asm ("%r3") = SYS_ify (name); \
@@ -302,7 +302,7 @@
(int) resultvar; })
/* The _NCS variant allows non-constant syscall numbers. */
-#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+#define INTERNAL_SYSCALL_NCS(name, nr, args...) \
({ \
unsigned long int resultvar; \
register long int r3 asm ("%r3") = (name); \
@@ -31,15 +31,13 @@ shmat (int shmid, const void *shmaddr, int shmflg)
#ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
return (void*) INLINE_SYSCALL_CALL (shmat, shmid, shmaddr, shmflg);
#else
- INTERNAL_SYSCALL_DECL(err);
unsigned long resultvar;
void *raddr;
- resultvar = INTERNAL_SYSCALL_CALL (ipc, err, IPCOP_shmat, shmid, shmflg,
+ resultvar = INTERNAL_SYSCALL_CALL (ipc, IPCOP_shmat, shmid, shmflg,
&raddr, shmaddr);
- if (INTERNAL_SYSCALL_ERROR_P (resultvar, err))
- return (void *) INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (resultvar,
- err));
+ if (INTERNAL_SYSCALL_ERROR_P (resultvar))
+ return (void *) INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (resultvar));
return raddr;
#endif
@@ -46,14 +46,14 @@
# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday"
#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...) \
- internal_syscall##nr(__SYSCALL_STRING, err, __NR_##name, args)
+#define INTERNAL_SYSCALL(name, nr, args...) \
+ internal_syscall##nr(__SYSCALL_STRING, __NR_##name, args)
#undef INTERNAL_SYSCALL_NCS
-#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
- internal_syscall##nr(__SYSCALL_STRING, err, name, args)
+#define INTERNAL_SYSCALL_NCS(name, nr, args...) \
+ internal_syscall##nr(__SYSCALL_STRING, name, args)
-#define internal_syscall0(string,err,name,dummy...) \
+#define internal_syscall0(string,name,dummy...) \
({ \
register long __err __asm__("g1") = (name); \
register long __o0 __asm__ ("o0"); \
@@ -63,7 +63,7 @@
__err == -1 ? -__o0 : __o0; \
})
-#define internal_syscall1(string,err,name,arg1) \
+#define internal_syscall1(string,name,arg1) \
({ \
long _arg1 = (long) (arg1); \
register long __err __asm__("g1") = (name); \
@@ -74,7 +74,7 @@
__err == -1 ? -__o0 : __o0; \
})
-#define internal_syscall2(string,err,name,arg1,arg2) \
+#define internal_syscall2(string,name,arg1,arg2) \
({ \
long _arg1 = (long) (arg1); \
long _arg2 = (long) (arg2); \
@@ -87,7 +87,7 @@
__err == -1 ? -__o0 : __o0; \
})
-#define internal_syscall3(string,err,name,arg1,arg2,arg3) \
+#define internal_syscall3(string,name,arg1,arg2,arg3) \
({ \
long _arg1 = (long) (arg1); \
long _arg2 = (long) (arg2); \
@@ -103,7 +103,7 @@
__err == -1 ? -__o0 : __o0; \
})
-#define internal_syscall4(string,err,name,arg1,arg2,arg3,arg4) \
+#define internal_syscall4(string,name,arg1,arg2,arg3,arg4) \
({ \
long _arg1 = (long) (arg1); \
long _arg2 = (long) (arg2); \
@@ -121,7 +121,7 @@
__err == -1 ? -__o0 : __o0; \
})
-#define internal_syscall5(string,err,name,arg1,arg2,arg3,arg4,arg5) \
+#define internal_syscall5(string,name,arg1,arg2,arg3,arg4,arg5) \
({ \
long _arg1 = (long) (arg1); \
long _arg2 = (long) (arg2); \
@@ -141,7 +141,7 @@
__err == -1 ? -__o0 : __o0; \
})
-#define internal_syscall6(string,err,name,arg1,arg2,arg3,arg4,arg5,arg6)\
+#define internal_syscall6(string,name,arg1,arg2,arg3,arg4,arg5,arg6) \
({ \
long _arg1 = (long) (arg1); \
long _arg2 = (long) (arg2); \
@@ -22,7 +22,7 @@
#include <ldsodefs.h>
#ifndef INTERNAL_VSYSCALL_CALL
-# define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \
+# define INTERNAL_VSYSCALL_CALL(funcptr, nr, args...) \
funcptr (args)
#endif
@@ -30,24 +30,23 @@
({ \
__label__ out; \
__label__ iserr; \
- INTERNAL_SYSCALL_DECL (sc_err); \
long int sc_ret; \
\
__typeof (GLRO(dl_vdso_##name)) vdsop = GLRO(dl_vdso_##name); \
if (vdsop != NULL) \
{ \
- sc_ret = INTERNAL_VSYSCALL_CALL (vdsop, sc_err, nr, ##args); \
- if (!INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err)) \
+ sc_ret = INTERNAL_VSYSCALL_CALL (vdsop, nr, ##args); \
+ if (!INTERNAL_SYSCALL_ERROR_P (sc_ret)) \
goto out; \
- if (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err) != ENOSYS) \
+ if (INTERNAL_SYSCALL_ERRNO (sc_ret) != ENOSYS) \
goto iserr; \
} \
\
- sc_ret = INTERNAL_SYSCALL (name, sc_err, nr, ##args); \
- if (INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err)) \
+ sc_ret = INTERNAL_SYSCALL_CALL (name, ##args); \
+ if (INTERNAL_SYSCALL_ERROR_P (sc_ret)) \
{ \
iserr: \
- __set_errno (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err)); \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (sc_ret)); \
sc_ret = -1L; \
} \
out: \
@@ -24,11 +24,8 @@
#ifndef __ASSEMBLER__
-#undef INTERNAL_SYSCALL_DECL
-#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
-
#undef INTERNAL_SYSCALL_ERROR_P
-#define INTERNAL_SYSCALL_ERROR_P(val, err) \
+#define INTERNAL_SYSCALL_ERROR_P(val) \
((unsigned long) (val) > -4096UL)
#ifndef SYSCALL_ERROR_LABEL
@@ -44,15 +41,14 @@
#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) \
({ \
- INTERNAL_SYSCALL_DECL (sc_err); \
- long int sc_ret = INTERNAL_SYSCALL (name, sc_err, nr, args); \
- __glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err)) \
- ? SYSCALL_ERROR_LABEL (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err)) \
+ long int sc_ret = INTERNAL_SYSCALL (name, nr, args); \
+ __glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (sc_ret)) \
+ ? SYSCALL_ERROR_LABEL (INTERNAL_SYSCALL_ERRNO (sc_ret)) \
: sc_ret; \
})
#undef INTERNAL_SYSCALL_ERRNO
-#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val))
+#define INTERNAL_SYSCALL_ERRNO(val) (-(val))
/* Set error number and return -1. A target may choose to return the
internal function, __syscall_error, which sets errno and returns -1.
@@ -148,11 +148,10 @@ timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
._sigev_un = { ._pad = { [0] = __helper_tid } } };
/* Create the timer. */
- INTERNAL_SYSCALL_DECL (err);
int res;
- res = INTERNAL_SYSCALL (timer_create, err, 3,
- syscall_clockid, &sev, &newp->ktimerid);
- if (! INTERNAL_SYSCALL_ERROR_P (res, err))
+ res = INTERNAL_SYSCALL_CALL (timer_create,
+ syscall_clockid, &sev, &newp->ktimerid);
+ if (! INTERNAL_SYSCALL_ERROR_P (res))
{
/* Add to the queue of active timers with thread
delivery. */
@@ -168,7 +167,7 @@ timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
/* Free the resources. */
free (newp);
- __set_errno (INTERNAL_SYSCALL_ERRNO (res, err));
+ __set_errno (INTERNAL_SYSCALL_ERRNO (res));
return -1;
}
@@ -47,8 +47,7 @@ timer_sigev_thread (void *arg)
signals. */
sigset_t ss;
sigemptyset (&ss);
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, NULL, _NSIG / 8);
+ INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_SETMASK, &ss, NULL, _NSIG / 8);
struct thread_start_data *td = (struct thread_start_data *) arg;
@@ -168,8 +167,7 @@ __start_helper_thread (void)
sigset_t oss;
sigfillset (&ss);
__sigaddset (&ss, SIGCANCEL);
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, &oss, _NSIG / 8);
+ INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_SETMASK, &ss, &oss, _NSIG / 8);
/* Create the helper thread for this timer. */
pthread_t th;
@@ -179,8 +177,7 @@ __start_helper_thread (void)
__helper_tid = ((struct pthread *) th)->tid;
/* Restore the signal mask. */
- INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &oss, NULL,
- _NSIG / 8);
+ INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_SETMASK, &oss, NULL, _NSIG / 8);
/* No need for the attribute anymore. */
(void) pthread_attr_destroy (&attr);
@@ -23,10 +23,9 @@
clock_t
__times (struct tms *buf)
{
- INTERNAL_SYSCALL_DECL (err);
- clock_t ret = INTERNAL_SYSCALL (times, err, 1, buf);
- if (INTERNAL_SYSCALL_ERROR_P (ret, err)
- && __builtin_expect (INTERNAL_SYSCALL_ERRNO (ret, err) == EFAULT, 0)
+ clock_t ret = INTERNAL_SYSCALL_CALL (times, buf);
+ if (INTERNAL_SYSCALL_ERROR_P (ret)
+ && __glibc_unlikely (INTERNAL_SYSCALL_ERRNO (ret) == EFAULT)
&& buf)
{
/* This might be an error or not. For architectures which have no
@@ -24,9 +24,7 @@ static inline int __attribute__ ((always_inline))
get_cet_status (void)
{
unsigned long long cet_status[3];
- INTERNAL_SYSCALL_DECL (err);
- if (INTERNAL_SYSCALL (arch_prctl, err, 2, ARCH_CET_STATUS,
- cet_status) == 0)
+ if (INTERNAL_SYSCALL_CALL (arch_prctl, ARCH_CET_STATUS, cet_status) == 0)
return cet_status[0];
return 0;
}
@@ -22,14 +22,13 @@ static inline int __attribute__ ((always_inline))
dl_cet_allocate_legacy_bitmap (unsigned long *legacy_bitmap)
{
/* Allocate legacy bitmap. */
- INTERNAL_SYSCALL_DECL (err);
#ifdef __LP64__
- return (int) INTERNAL_SYSCALL (arch_prctl, err, 2,
- ARCH_CET_LEGACY_BITMAP, legacy_bitmap);
+ return (int) INTERNAL_SYSCALL_CALL (arch_prctl,
+ ARCH_CET_LEGACY_BITMAP, legacy_bitmap);
#else
unsigned long long legacy_bitmap_u64[2];
- int res = INTERNAL_SYSCALL (arch_prctl, err, 2,
- ARCH_CET_LEGACY_BITMAP, legacy_bitmap_u64);
+ int res = INTERNAL_SYSCALL_CALL (arch_prctl,
+ ARCH_CET_LEGACY_BITMAP, legacy_bitmap_u64);
if (res == 0)
{
legacy_bitmap[0] = legacy_bitmap_u64[0];
@@ -42,14 +41,12 @@ dl_cet_allocate_legacy_bitmap (unsigned long *legacy_bitmap)
static inline int __attribute__ ((always_inline))
dl_cet_disable_cet (unsigned int cet_feature)
{
- INTERNAL_SYSCALL_DECL (err);
- return (int) INTERNAL_SYSCALL (arch_prctl, err, 2, ARCH_CET_DISABLE,
- cet_feature);
+ return (int) INTERNAL_SYSCALL_CALL (arch_prctl, ARCH_CET_DISABLE,
+ cet_feature);
}
static inline int __attribute__ ((always_inline))
dl_cet_lock_cet (void)
{
- INTERNAL_SYSCALL_DECL (err);
- return (int) INTERNAL_SYSCALL (arch_prctl, err, 2, ARCH_CET_LOCK, 0);
+ return (int) INTERNAL_SYSCALL_CALL (arch_prctl, ARCH_CET_LOCK, 0);
}
@@ -56,8 +56,10 @@
/* We don't want the label for the error handle to be global when we define
it here. */
# ifdef PIC
+# undef SYSCALL_ERROR_LABEL
# define SYSCALL_ERROR_LABEL 0f
# else
+# undef SYSCALL_ERROR_LABEL
# define SYSCALL_ERROR_LABEL syscall_error
# endif
@@ -189,15 +191,15 @@
#define ARGIFY(X) ((__typeof__ ((X) - (X))) (X))
#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...) \
- internal_syscall##nr (SYS_ify (name), err, args)
+#define INTERNAL_SYSCALL(name, nr, args...) \
+ internal_syscall##nr (SYS_ify (name), args)
#undef INTERNAL_SYSCALL_NCS
-#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
- internal_syscall##nr (number, err, args)
+#define INTERNAL_SYSCALL_NCS(number, nr, args...) \
+ internal_syscall##nr (number, args)
#undef internal_syscall0
-#define internal_syscall0(number, err, dummy...) \
+#define internal_syscall0(number, dummy...) \
({ \
unsigned long int resultvar; \
asm volatile ( \
@@ -209,7 +211,7 @@
})
#undef internal_syscall1
-#define internal_syscall1(number, err, arg1) \
+#define internal_syscall1(number, arg1) \
({ \
unsigned long int resultvar; \
TYPEFY (arg1, __arg1) = ARGIFY (arg1); \
@@ -223,7 +225,7 @@
})
#undef internal_syscall2
-#define internal_syscall2(number, err, arg1, arg2) \
+#define internal_syscall2(number, arg1, arg2) \
({ \
unsigned long int resultvar; \
TYPEFY (arg2, __arg2) = ARGIFY (arg2); \
@@ -239,7 +241,7 @@
})
#undef internal_syscall3
-#define internal_syscall3(number, err, arg1, arg2, arg3) \
+#define internal_syscall3(number, arg1, arg2, arg3) \
({ \
unsigned long int resultvar; \
TYPEFY (arg3, __arg3) = ARGIFY (arg3); \
@@ -257,7 +259,7 @@
})
#undef internal_syscall4
-#define internal_syscall4(number, err, arg1, arg2, arg3, arg4) \
+#define internal_syscall4(number, arg1, arg2, arg3, arg4) \
({ \
unsigned long int resultvar; \
TYPEFY (arg4, __arg4) = ARGIFY (arg4); \
@@ -277,7 +279,7 @@
})
#undef internal_syscall5
-#define internal_syscall5(number, err, arg1, arg2, arg3, arg4, arg5) \
+#define internal_syscall5(number, arg1, arg2, arg3, arg4, arg5) \
({ \
unsigned long int resultvar; \
TYPEFY (arg5, __arg5) = ARGIFY (arg5); \
@@ -300,7 +302,7 @@
})
#undef internal_syscall6
-#define internal_syscall6(number, err, arg1, arg2, arg3, arg4, arg5, arg6) \
+#define internal_syscall6(number, arg1, arg2, arg3, arg4, arg5, arg6) \
({ \
unsigned long int resultvar; \
TYPEFY (arg6, __arg6) = ARGIFY (arg6); \
@@ -20,7 +20,7 @@
/* Linux times system call returns 64-bit integer. */
#undef internal_syscall1
-#define internal_syscall1(number, err, arg1) \
+#define internal_syscall1(number, arg1) \
({ \
unsigned long long int resultvar; \
TYPEFY (arg1, __arg1) = ARGIFY (arg1); \
@@ -34,7 +34,7 @@
})
#undef INTERNAL_SYSCALL_ERROR_P
-#define INTERNAL_SYSCALL_ERROR_P(val, err) \
+#define INTERNAL_SYSCALL_ERROR_P(val) \
((unsigned long long int) (val) >= -4095LL)
#include <sysdeps/unix/sysv/linux/times.c>