From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22659 invoked by alias); 28 Nov 2012 09:27:28 -0000 Received: (qmail 22649 invoked by uid 22791); 28 Nov 2012 09:27:27 -0000 X-SWARE-Spam-Status: No, hits=-7.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 28 Nov 2012 09:27:19 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAS9RJEa015965 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 28 Nov 2012 04:27:19 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qAS9RBtA017721; Wed, 28 Nov 2012 04:27:17 -0500 Message-ID: <50B5D8EF.1020400@redhat.com> Date: Wed, 28 Nov 2012 09:27:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Tom Tromey CC: gdb-patches@sourceware.org Subject: Re: RFC: make thread_list static References: <87y5hmdhl0.fsf@fleche.redhat.com> In-Reply-To: <87y5hmdhl0.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00799.txt.bz2 On 11/27/2012 06:30 PM, Tom Tromey wrote: > I've had this patch on a branch for a while and thought I would send it > today. > > I noticed that thread_list is only used in one place outside of > thread.c. It seems generally preferable to me to keep things like this > private. So, this patch makes it static and updates the one user. Well, if you ask me, I can't agree since I had added it recently (git blame points at last July). :-) This was after getting sick of writing callback-style iterators in the itsets run-control work, and introducing the macro there first. This isn't different from ALL_OBJFILES and several other similar macros in the tree (which I realize from this that you'd rather remove). We could switch to callback-style before pushing those patches in, but, IMO, the convenience and readability of the resulting code trumps the implementation detail exposure detail. -- Pedro Alves