This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

extend gthr-posix.h with rwlock


We have code that fails to scale do to the object_mutex lock in unwind-dw2-fde.c. This mutex protects two lists local to the file. The primary list is used in "read-mostly" mode, with the secondary list used rarely when writing needs to happen.

I am trying to change this locking scheme to use a reader/writer lock (I'd prefer something even more scalable, like an RCU style algorithm, or seqlock + partially visible reader count, but I don't have time at the moment to do anything like that).

I've set up forwarding to pthread_rwlock_t and the corresponding functions in gthr-posix.h, just following the template of how pthread_mutex_t is linked in.

My problem is that unwind-dw2-fde.c seems to be compiled multiple times during a gcc build, and sometimes my additions are found but other times they are not. I am rebuilding again (AIX 5.1), and I'll post more information for anyone that needs it.

In the meantime, is there a how-to anywhere that describes adding or modifying gthr.h models in gcc?

Thanks,
Luke


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]