Re: Horrible regression with -CURRENT from "Don't busy-lock-loop in preemptable spinlocks" patch

From: Chris Wedgwood <cw_at_f00f.org>
Date: 2005-01-18 18:08:52
On Tue, Jan 18, 2005 at 03:28:58PM +1100, Darren Williams wrote:

> On top of Ingo's patch I attempt a solution that failed:

> +#define read_is_locked(x)	(*(volatile int *) (x) > 0)
> +#define write_is_locked(x)	(*(volatile int *) (x) < 0)

how about something like:

#define read_is_locked(x)    (*(volatile int *) (x) != 0)
#define write_is_locked(x)   (*(volatile int *) (x) & (1<<31))

I'm not masking the write-bit for read_is_locked here, I'm not sure is
we should?


   --cw
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Jan 18 02:09:29 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:34 EST