public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* extend gthr-posix.h with rwlock
@ 2008-06-05 18:02 Luke Dalessandro
  2008-06-05 18:27 ` David Edelsohn
  0 siblings, 1 reply; 5+ messages in thread
From: Luke Dalessandro @ 2008-06-05 18:02 UTC (permalink / raw)
  To: gcc

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-06-06  0:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-05 18:02 extend gthr-posix.h with rwlock Luke Dalessandro
2008-06-05 18:27 ` David Edelsohn
2008-06-05 22:41   ` Luke Dalessandro
2008-06-05 22:59     ` David Edelsohn
2008-06-06  0:05       ` Luke Dalessandro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).