From d8b587796f7cfa0c3aa780ad19afe2e30ce84a09 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 23 Feb 2014 05:43:09 -0500 Subject: [PATCH] mostly-cosmetic fixups to x32 port merge --- arch/x32/syscall_arch.h | 2 +- src/internal/syscall.h | 7 ++----- src/thread/cancel_dummy.c | 5 +++-- src/thread/cancel_impl.c | 10 ++++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/arch/x32/syscall_arch.h b/arch/x32/syscall_arch.h index 57e76896..39a0325b 100644 --- a/arch/x32/syscall_arch.h +++ b/arch/x32/syscall_arch.h @@ -2,7 +2,7 @@ #define __SYSCALL_LL_O(x) (x) #define __scc(X) sizeof(1?(X):0ULL) < 8 ? (unsigned long) (X) : (long long) (X) -#define syscall_arg_t long long +typedef long long syscall_arg_t; struct __timespec { long long tv_sec; long tv_nsec; }; struct __timespec_kernel { long long tv_sec; long long tv_nsec; }; #define __tsc(X) ((struct __timespec*)(unsigned long)(X)) diff --git a/src/internal/syscall.h b/src/internal/syscall.h index b203d6bb..88fc89c9 100644 --- a/src/internal/syscall.h +++ b/src/internal/syscall.h @@ -5,11 +5,8 @@ #include "syscall_arch.h" #ifndef __scc -#define __scc(X) (long) (X) -#endif - -#ifndef syscall_arg_t -#define syscall_arg_t long +#define __scc(X) ((long) (X)) +typedef long syscall_arg_t; #endif #if defined(__PIC__) && (100*__GNUC__+__GNUC_MINOR__ >= 303) diff --git a/src/thread/cancel_dummy.c b/src/thread/cancel_dummy.c index cc872375..b630b02c 100644 --- a/src/thread/cancel_dummy.c +++ b/src/thread/cancel_dummy.c @@ -1,8 +1,9 @@ #include "pthread_impl.h" #include "syscall.h" -static long sccp(syscall_arg_t nr, syscall_arg_t u, syscall_arg_t v, - syscall_arg_t w, syscall_arg_t x, syscall_arg_t y, syscall_arg_t z) +static long sccp(syscall_arg_t nr, + syscall_arg_t u, syscall_arg_t v, syscall_arg_t w, + syscall_arg_t x, syscall_arg_t y, syscall_arg_t z) { return (__syscall)(nr, u, v, w, x, y, z); } diff --git a/src/thread/cancel_impl.c b/src/thread/cancel_impl.c index 134fd7d3..c835813a 100644 --- a/src/thread/cancel_impl.c +++ b/src/thread/cancel_impl.c @@ -9,11 +9,13 @@ void __cancel() pthread_exit(PTHREAD_CANCELED); } -long __syscall_cp_asm(volatile void *, syscall_arg_t, syscall_arg_t, syscall_arg_t, - syscall_arg_t, syscall_arg_t, syscall_arg_t, syscall_arg_t); +long __syscall_cp_asm(volatile void *, syscall_arg_t, + syscall_arg_t, syscall_arg_t, syscall_arg_t, + syscall_arg_t, syscall_arg_t, syscall_arg_t); -long (__syscall_cp)(syscall_arg_t nr, syscall_arg_t u, syscall_arg_t v, syscall_arg_t w, - syscall_arg_t x, syscall_arg_t y, syscall_arg_t z) +long (__syscall_cp)(syscall_arg_t nr, + syscall_arg_t u, syscall_arg_t v, syscall_arg_t w, + syscall_arg_t x, syscall_arg_t y, syscall_arg_t z) { pthread_t self; long r; -- 2.25.1