Messages in this thread | | | Date | Thu, 7 Feb 2013 10:28:43 +0000 | From | Jamie Iles <> | Subject | Re: [PATCH 09/11] liblockdep: support using LD_PRELOAD |
| |
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 <sasha.levin@oracle.com> > --- > 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
| |