lkml.org 
[lkml]   [2005]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: hashed spinlocks
From
Date
On Sun, 2005-07-31 at 12:11 -0700, David S. Miller wrote:
> From: Daniel Walker <dwalker@mvista.com>
> Date: Sun, 31 Jul 2005 12:06:47 -0700
>
> > The ifdef that switched between the two rt_hash_lock_addr() switched on
> > for CONFIG_SMP or CONFIG_DEBUG_SPINLOCK . I was compiling UP , so I
> > didn't get either.
> >
> > Seems like you'll need to have an rt_hash_lock(slot) that replaces the
> > spin_lock calls ..
>
> spin_lock(x) and spin_unlock(x) are both a nop in this case, so what
> is the problem passing in a NULL? The argument is arbitrary and should
> should just ignored, right?

True.

> If both CONFIG_SMP and CONFIG_DEBUG_SPINLOCK are disabled, we
> end up with these definitions in linux/spinlock.h
>
> #define spin_lock(lock) _spin_lock(lock)
>
> #define _spin_lock(lock) \
> do { \
> preempt_disable(); \
> _raw_spin_lock(lock); \
> __acquire(lock); \
> } while(0)
>
> #define _raw_spin_lock(lock) do { (void)(lock); } while(0)
>
> What kind of warning do you get?

It was an RT kernel, which isn't mainline .. Your right it shouldn't be
a problem .

Daniel

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-31 21:23    [W:1.295 / U:1.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site