[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130201095701.GA23061@gmail.com>
Date: Fri, 1 Feb 2013 10:57:01 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Sasha Levin <sasha.levin@...cle.com>
Cc: mingo@...hat.com, peterz@...radead.org, paulus@...ba.org,
acme@...stprotocols.net, penberg@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/7] liblock: public headers for mutex implementation
* Sasha Levin <sasha.levin@...cle.com> wrote:
> These headers provide the same API as their pthread mutex counterparts.
>
> The design here is to allow to easily switch to liblock lock validation
> just by adding a "liblock_" to pthread_mutex_*() calls, which means that
> it's easy to integrate liblock into existing codebases.
I'd suggest to name the user-space counterpart 'liblockdep', to
make it clear that this is user-space lockdep.
Regarding pthread_mutex_t checking, I think what we *really*
want is a wrapper that can be activated via:
#define __USE_LIBLOCKDEP
And which then takes over the pthread primitives via:
#define pthread_mutex_lock liblockdep_pthread_mutex_lock
or so.
That way the source code only needs a __USE_LIBLOCKDEP in one or
two key places and checking is activated.
Thanks,
Ingo
--
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