From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18923 invoked by alias); 5 Jun 2008 18:02:10 -0000 Received: (qmail 18867 invoked by uid 22791); 5 Jun 2008 18:02:08 -0000 X-Spam-Check-By: sourceware.org Received: from slate.cs.rochester.edu (HELO slate.cs.rochester.edu) (192.5.53.101) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 05 Jun 2008 18:01:49 +0000 Received: from core2.local (cycle1.cs.rochester.edu [128.151.67.99]) by slate.cs.rochester.edu (8.13.8/8.13.8) with ESMTP id m55I1kRM021051 for ; Thu, 5 Jun 2008 14:01:47 -0400 Message-ID: <48482A0B.4080609@cs.rochester.edu> Date: Thu, 05 Jun 2008 18:02:00 -0000 From: Luke Dalessandro User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: gcc@gcc.gnu.org Subject: extend gthr-posix.h with rwlock Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2008-06/txt/msg00124.txt.bz2 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