|
From: Tom H. <th...@cy...> - 2004-06-27 13:29:58
|
In message <Pin...@ba...>
Darius Ivanauskas <da...@ge...> wrote:
> I just wonder why in the coregrind/vg_libpthread.c and
> coregrind/arch/x86-linux/vg_libpthread.c, in the function
> pthread_rwlock_unlock(...) there are dublicated line:
>
> rwl = rw_remap ( orig );
> rwl = rw_remap ( orig );
It's just a bug. It shouldn't any ill effects, but I've removed the
duplicate call anyway. Note that the arch/x86-linux version isn't
actually used at the moment.
> And another question:
>
> I looked at the vg_libpthread.c implementation for semaphores - they have
> se_unmap(...) function for clear out place in the se_remap_* array. I dont
> know if i'm right but it seems that it should work only for the last
> (se_remap_used) member released. Otherwise you are getting hole in the
> array - and the last member which is now in the position [se_remap_used+1]
> gets inaccessible. It is nevermind if im right or wrong, i just want to
> ask are you going to implement similar mechanism of reusing rw_remap_*
> entries because when test program allocates rw_locks dynamically i'm
> getting "VG_N_RWLOCKS is too low." very soon :(
The se_unmap function no longer exists as the semaphore mapping scheme
was changed a while ago to remove the limit on the number of semaphores.
It sounds like a similar rework of rwlocks might be helpful to you?
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|