summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_spinlock.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2008-04-23 21:06:51 +0000
committerdelphij <delphij@FreeBSD.org>2008-04-23 21:06:51 +0000
commit6b7d75207628536a474b37340d955b403cec99aa (patch)
treeeefa1873a48ad2f06f0d1c491c89695e643709f5 /lib/libthr/thread/thr_spinlock.c
parent792d568d6d8f529648c76c67e723a9eabbb350c6 (diff)
downloadFreeBSD-src-6b7d75207628536a474b37340d955b403cec99aa.zip
FreeBSD-src-6b7d75207628536a474b37340d955b403cec99aa.tar.gz
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
Diffstat (limited to 'lib/libthr/thread/thr_spinlock.c')
-rw-r--r--lib/libthr/thread/thr_spinlock.c12
1 files changed, 6 insertions, 6 deletions
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
OpenPOWER on IntegriCloud