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-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/