From 8ebd4b8855981462a03f5930a1f8d712c021190f Mon Sep 17 00:00:00 2001 From: Austin Foxley Date: Wed, 9 Dec 2009 16:53:57 -0800 Subject: nptl: fix old style function declerations also fix a few shadowed local warnings Signed-off-by: Austin Foxley --- libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h | 6 +++--- libpthread/nptl/sysdeps/unix/sysv/linux/pthread_kill.c | 6 +++--- libpthread/nptl/sysdeps/unix/sysv/linux/timer_create.c | 8 ++++---- libpthread/nptl/sysdeps/unix/sysv/linux/timer_delete.c | 3 +-- libpthread/nptl/sysdeps/unix/sysv/linux/timer_getoverr.c | 3 +-- libpthread/nptl/sysdeps/unix/sysv/linux/timer_gettime.c | 6 +++--- libpthread/nptl/sysdeps/unix/sysv/linux/timer_settime.c | 10 +++++----- libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h | 6 +++--- 8 files changed, 23 insertions(+), 25 deletions(-) (limited to 'libpthread/nptl/sysdeps/unix/sysv') diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h index 1a060c0f4..1033ebc2d 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h @@ -173,7 +173,7 @@ extern int __lll_mutex_unlock_wake (int *__futex) #define lll_mutex_timedlock(futex, timeout) \ - ({ int result, ignore1, ignore2; \ + ({ int _result, ignore1, ignore2; \ __asm__ __volatile (LOCK_INSTR "cmpxchgl %1, %3\n\t" \ "jnz _L_mutex_timedlock_%=\n\t" \ ".subsection 1\n\t" \ @@ -186,11 +186,11 @@ extern int __lll_mutex_unlock_wake (int *__futex) ".size _L_mutex_timedlock_%=,.-_L_mutex_timedlock_%=\n"\ ".previous\n" \ "1:" \ - : "=a" (result), "=c" (ignore1), "=&d" (ignore2), \ + : "=a" (_result), "=c" (ignore1), "=&d" (ignore2), \ "=m" (futex) \ : "0" (0), "1" (1), "m" (futex), "m" (timeout) \ : "memory"); \ - result; }) + _result; }) #define lll_mutex_unlock(futex) \ diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_kill.c b/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_kill.c index 104472468..8d887e020 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_kill.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_kill.c @@ -26,9 +26,9 @@ int -__pthread_kill (threadid, signo) - pthread_t threadid; - int signo; +__pthread_kill ( + pthread_t threadid, + int signo) { struct pthread *pd = (struct pthread *) threadid; diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/timer_create.c b/libpthread/nptl/sysdeps/unix/sysv/linux/timer_create.c index 09a571659..9f02fe3b2 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/timer_create.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/timer_create.c @@ -49,10 +49,10 @@ int __no_posix_timers attribute_hidden; int -timer_create (clock_id, evp, timerid) - clockid_t clock_id; - struct sigevent *evp; - timer_t *timerid; +timer_create ( + clockid_t clock_id, + struct sigevent *evp, + timer_t *timerid) { # undef timer_create # ifndef __ASSUME_POSIX_TIMERS diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/timer_delete.c b/libpthread/nptl/sysdeps/unix/sysv/linux/timer_delete.c index 3ebbbce30..9b92446d5 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/timer_delete.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/timer_delete.c @@ -39,8 +39,7 @@ static int compat_timer_delete (timer_t timerid); int -timer_delete (timerid) - timer_t timerid; +timer_delete (timer_t timerid) { # undef timer_delete # ifndef __ASSUME_POSIX_TIMERS diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/timer_getoverr.c b/libpthread/nptl/sysdeps/unix/sysv/linux/timer_getoverr.c index 4c97f97ce..7afc5ec6f 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/timer_getoverr.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/timer_getoverr.c @@ -38,8 +38,7 @@ static int compat_timer_getoverrun (timer_t timerid); int -timer_getoverrun (timerid) - timer_t timerid; +timer_getoverrun (timer_t timerid) { # undef timer_getoverrun # ifndef __ASSUME_POSIX_TIMERS diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/timer_gettime.c b/libpthread/nptl/sysdeps/unix/sysv/linux/timer_gettime.c index 3ce0916a8..31401b19b 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/timer_gettime.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/timer_gettime.c @@ -39,9 +39,9 @@ static int compat_timer_gettime (timer_t timerid, struct itimerspec *value); int -timer_gettime (timerid, value) - timer_t timerid; - struct itimerspec *value; +timer_gettime ( + timer_t timerid, + struct itimerspec *value) { # undef timer_gettime # ifndef __ASSUME_POSIX_TIMERS diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/timer_settime.c b/libpthread/nptl/sysdeps/unix/sysv/linux/timer_settime.c index 558c63f26..8c6ad91fa 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/timer_settime.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/timer_settime.c @@ -41,11 +41,11 @@ static int compat_timer_settime (timer_t timerid, int flags, int -timer_settime (timerid, flags, value, ovalue) - timer_t timerid; - int flags; - const struct itimerspec *value; - struct itimerspec *ovalue; +timer_settime ( + timer_t timerid, + int flags, + const struct itimerspec *value, + struct itimerspec *ovalue) { # undef timer_settime # ifndef __ASSUME_POSIX_TIMERS diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h index 694cbf448..35cd868d0 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h @@ -143,7 +143,7 @@ extern int __lll_mutex_unlock_wait (int *__futex) attribute_hidden; #define lll_mutex_timedlock(futex, timeout) \ - ({ int result, ignore1, ignore2, ignore3; \ + ({ int _result, ignore1, ignore2, ignore3; \ __asm __volatile (LOCK_INSTR "cmpxchgl %2, %4\n\t" \ "jnz 1f\n\t" \ ".subsection 1\n" \ @@ -155,11 +155,11 @@ extern int __lll_mutex_unlock_wait (int *__futex) attribute_hidden; "jmp 2f\n\t" \ ".previous\n" \ "2:" \ - : "=a" (result), "=&D" (ignore1), "=S" (ignore2), \ + : "=a" (_result), "=&D" (ignore1), "=S" (ignore2), \ "=&d" (ignore3), "=m" (futex) \ : "0" (0), "2" (1), "m" (futex), "m" (timeout) \ : "memory", "cx", "cc", "r10", "r11"); \ - result; }) + _result; }) #define lll_mutex_unlock(futex) \ -- cgit v1.2.3