Make statically initialised read-write locks work.

BUG: 91604


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2790
This commit is contained in:
Tom Hughes 2004-10-18 17:34:43 +00:00
parent 296804a70e
commit 25725b8d8b
2 changed files with 7 additions and 1 deletions

View File

@ -3063,7 +3063,7 @@ static vg_rwlock_t* rw_lookup ( pthread_rwlock_t* orig )
CONVERT(rwlock, orig, vg_orig);
if (vg_orig->__vg_rw_writer == NULL)
rwl = rw_new (orig);
rwl = rw_new ((pthread_rwlock_t*)orig);
else if (((Addr)vg_orig->__vg_rw_writer ^ RWLOCK_CHECK_MAGIC) == (Addr)vg_orig->__vg_rw_read_waiting)
rwl = vg_orig->__vg_rw_writer;
else

View File

@ -57,6 +57,12 @@
ret VG_INTERCEPT(soname:libc.so.6, __##name) args \
__attribute__((alias(VG_INTERCEPT_ALIAS(soname:libc.so.6, ##name)), \
visibility("protected"))); \
ret VG_INTERCEPT(soname:libstdc++*, __##name##_internal) args \
__attribute__((alias(VG_INTERCEPT_ALIAS(soname:libc.so.6, ##name)), \
visibility("protected"))); \
ret VG_INTERCEPT(soname:libc.so.6, __##name##_internal) args \
__attribute__((alias(VG_INTERCEPT_ALIAS(soname:libc.so.6, ##name)), \
visibility("protected"))); \
ret VG_INTERCEPT(soname:libstdc++*, ##name) args \
__attribute__((alias(VG_INTERCEPT_ALIAS(soname:libc.so.6, ##name)), \
visibility("protected"))); \