lkml.org 
[lkml]   [2004]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.9-rc2-mm3
On Sat, Sep 25, 2004 at 11:27:49AM +0200, Xavier Bestel wrote:
> Le sam 25/09/2004 à 11:19, Russell King a écrit :
>
> > I wonder if we should consider adding:
> >
> > WARN_ON(!spin_is_locked(&tty_termios_lock));
> >
> > in there.
> >
> > However, the one annoying thing about "spin_is_locked" is that, on UP,
> > it defaults to "unlocked" which makes these kinds of checks too noisy.
> > Maybe we need a spin_is_locked() with a bias towards being locked for UP?
>
> Or something like:
>
> #define spin_is_safe(lock) ((!CONFIG_SMP) || spin_is_locked(lock))
>
> (maybe as an inline)

You can't rely on CONFIG_SMP always being 0 or 1. When it's turned off,
it's undefined, rather than being defined to 0.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
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-03-22 14:06    [W:0.054 / U:37.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site