[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPz4a6BzYdwH-fTdP=tC-AcC4x_bMtu4YHa80rcTUy6ZV4JEfA@mail.gmail.com>
Date: Wed, 29 Jun 2011 13:10:39 -0700
From: Dima Zavin <dima@...roid.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org, Lai Jiangshan <laijs@...fujitsu.com>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] plist: add mutex to the blessed lock type for plists
On Wed, Jun 29, 2011 at 1:01 PM, Steven Rostedt <rostedt@...dmis.org> wrote:
> On Wed, 2011-06-29 at 12:33 -0700, Dima Zavin wrote:
>
>> +#include <linux/mutex.h>
>> #include <linux/plist.h>
>> #include <linux/spinlock.h>
>>
>> @@ -56,11 +57,14 @@ static void plist_check_list(struct list_head *top)
>>
>> static void plist_check_head(struct plist_head *head)
>> {
>> - WARN_ON(head != &test_head && !head->rawlock && !head->spinlock);
>> + WARN_ON(head != &test_head && !head->rawlock && !head->spinlock &&
>> + !head->mutex);
>> if (head->rawlock)
>> WARN_ON_SMP(!raw_spin_is_locked(head->rawlock));
>> if (head->spinlock)
>> WARN_ON_SMP(!spin_is_locked(head->spinlock));
>> + if (head->mutex)
>> + WARN_ON_SMP(!mutex_is_locked(head->mutex));
>
> Spin locks are NOPs on SMP, but mutexes are not. Are you sure you want
> this as WARN_ON_SMP()?
Doh. Copy-pasty-itis.. Will switch to plain WARN_ON.
--Dima
>
> -- Steve
>
>> if (!plist_head_empty(head))
>> plist_check_list(&plist_first(head)->prio_list);
>> plist_check_list(&head->node_list);
>
>
>
--
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