From 6b7d75207628536a474b37340d955b403cec99aa Mon Sep 17 00:00:00 2001 From: delphij Date: Wed, 23 Apr 2008 21:06:51 +0000 Subject: Avoid various shadowed variables. libthr is now almost WARNS=4 clean except for some const dequalifiers that needs more careful investigation. Ok'ed by: davidxu --- lib/libthr/thread/thr_spinlock.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/libthr/thread/thr_spinlock.c') diff --git a/lib/libthr/thread/thr_spinlock.c b/lib/libthr/thread/thr_spinlock.c index c0e57b0..ecc8067 100644 --- a/lib/libthr/thread/thr_spinlock.c +++ b/lib/libthr/thread/thr_spinlock.c @@ -63,16 +63,16 @@ static void init_spinlock(spinlock_t *lck); void _spinunlock(spinlock_t *lck) { - struct spinlock_extra *extra; + struct spinlock_extra *_extra; - extra = (struct spinlock_extra *)lck->fname; - THR_UMUTEX_UNLOCK(_get_curthread(), &extra->lock); + _extra = (struct spinlock_extra *)lck->fname; + THR_UMUTEX_UNLOCK(_get_curthread(), &_extra->lock); } void _spinlock(spinlock_t *lck) { - struct spinlock_extra *extra; + struct spinlock_extra *_extra; if (!__isthreaded) PANIC("Spinlock called when not threaded."); @@ -80,8 +80,8 @@ _spinlock(spinlock_t *lck) PANIC("Spinlocks not initialized."); if (lck->fname == NULL) init_spinlock(lck); - extra = (struct spinlock_extra *)lck->fname; - THR_UMUTEX_LOCK(_get_curthread(), &extra->lock); + _extra = (struct spinlock_extra *)lck->fname; + THR_UMUTEX_LOCK(_get_curthread(), &_extra->lock); } void -- cgit v1.1