Hi Sasha,

On Wed, Feb 06, 2013 at 05:11:32PM -0500, Sasha Levin wrote:
> This allows lockdep to be used without being compiled in the original program.
> 
> Usage is quite simple:
> 
>       LD_PRELOAD=/path/to/liblockdep.so /path/to/my/program
> 
> And magically, you'll have lockdep in your program!
> 
> Signed-off-by: Sasha Levin <[email protected]>
> ---
> diff --git a/tools/lib/lockdep/preload.c b/tools/lib/lockdep/preload.c
> new file mode 100644
> index 0000000..0f71c23
> --- /dev/null
> +++ b/tools/lib/lockdep/preload.c
...
> +int pthread_rwlock_init(pthread_rwlock_t *rwlock,
> +                     const pthread_rwlockattr_t *attr)
> +{
> +     if (ll_pthread_rwlock_init == NULL)
> +             init_preload();

Why is this one special, doesn't init_preload being a constructor make 
this redundant?

Jamie
--
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/

Reply via email to