Re: [PATCH RFC] 'spinlock/rwlock fixes' V3 [1/1]

From: Andrew Morton <akpm_at_osdl.org>
Date: 2005-01-20 14:01:04
Given the general confusion and the difficulty of defining and
understanding the semantics of these predicates.  And given that the
foo_is_locked() predicates have a history of being used to implement
ghastly kludges, how about we simply nuke this statement:

Chris Wedgwood <cw@f00f.org> wrote:
>
>  	if (!spin_is_locked(&p->sighand->siglock) &&
>  -				!rwlock_is_locked(&tasklist_lock))
>  +				!rwlock_write_locked(&tasklist_lock))

and be done with the whole thing?

I mean, do we really want these things in the kernel anyway?  We've never
needed them before.

If we reeeealy need the debug check, just do

	BUG_ON(read_trylock(...))

-
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 Wed Jan 19 22:01:51 2005

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