[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1303144266.7181.41.camel@gandalf.stny.rr.com>
Date: Mon, 18 Apr 2011 12:31:06 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Ingo Molnar <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>,
Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [RFC][PATCH 3/7] lockdep: Annotate read/write states
On Sun, 2011-04-17 at 11:45 +0200, Peter Zijlstra wrote:
> #ifdef CONFIG_DEBUG_LOCK_ALLOC
> # ifdef CONFIG_PROVE_LOCKING
> -# define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i)
> -# define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 2, NULL, i)
> +# define rwlock_acquire(l, s, t, i) \
> + lock_acquire(l, s, t, STATE_WRITE, 2, NULL, i)
> +# define rwlock_acquire_read(l, s, t, i) \
> + lock_acquire(l, s, t, STATE_RECURSIVE_READ, 2, NULL, i)
> # else
> -# define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i)
> -# define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 1, NULL, i)
> +# define rwlock_acquire(l, s, t, i) \
> + lock_acquire(l, s, t, STATE_WRITE, 1, NULL, i)
> +# define rwlock_acquire_read(l, s, t, i) \
> + lock_acquire(l, s, t, STATE_RECURSIVE_READ, 1, NULL, i)
> # endif
> # define rwlock_release(l, n, i) lock_release(l, n, i)
> #else
OT, I like this, we need to get rid of that other 2 and 1 too, as it is
very confusing to what they mean. But that can be done in a later clean
up.
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists