Re: [parisc-linux] Re: [PATCH] Fix the cpumask rewrite

From: Alan Cox
Date: Thu Jul 01 2004 - 10:11:39 EST


On Iau, 2004-07-01 at 14:11, Pavel Machek wrote:
> Heh, with vojtech we introduced locking into input layer
> (there was none before)... using test_bit/set_bit.
>
> (I just hope set_bit etc implies memory barrier... or we'll have to do
> it once more)

It doesn't - the ppp layer got burned badly by this long ago. set_bit is
not a memory barrier. OTOH you can just add an mb()

With respect to the need for a get_jiffies API I don't think you
do need it for ratelimit.

static DECLARE_TIMEOUT_EXPIRED(printk_timer);

if(timeout_expired(t))
{
printk("Blah");
timeout_set(t, 5 * HZ);
}

if we followed the way MUTEX and the other defines work.




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