From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25194 invoked by alias); 23 Dec 2003 22:24:27 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 25178 invoked from network); 23 Dec 2003 22:24:26 -0000 Received: from unknown (HELO gateway.sf.frob.com) (64.81.54.130) by sources.redhat.com with SMTP; 23 Dec 2003 22:24:26 -0000 Received: from magilla.sf.frob.com (magilla.sf.frob.com [198.49.250.228]) by gateway.sf.frob.com (Postfix) with ESMTP id 48296357B; Tue, 23 Dec 2003 14:24:25 -0800 (PST) Received: from magilla.sf.frob.com (localhost.localdomain [127.0.0.1]) by magilla.sf.frob.com (8.12.9/8.12.9) with ESMTP id hBNMOOHi029119; Tue, 23 Dec 2003 14:24:24 -0800 Received: (from roland@localhost) by magilla.sf.frob.com (8.12.9/8.12.9/Submit) id hBNMON0p029115; Tue, 23 Dec 2003 14:24:23 -0800 Date: Tue, 23 Dec 2003 22:24:00 -0000 Message-Id: <200312232224.hBNMON0p029115@magilla.sf.frob.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: davidm@hpl.hp.com Cc: drepper@redhat.com, libc-hacker@sources.redhat.com Subject: Re: enabling caching for dl_iterate_phdr() In-Reply-To: David Mosberger's message of Tuesday, 16 December 2003 11:54:57 -0800 <200312161954.hBGJsvaC003146@napali.hpl.hp.com> Emacs: because editing your files should be a traumatic experience. X-SW-Source: 2003-12/txt/msg00085.txt.bz2 > Would it be possible to add two atomic counters, dl_load_additions and > dl_load_removals, which would get incremented whenever something is a > phdr is added to/removed from the list that is traversed by > dl_iterate_phdr()? What interface do you propose for exposing such counters? We won't be adding any published interfaces using variables. > Any opinions? I guess the alternative that was mentioned in the past > was to use callbacks, but that seems very dangerous in regards to > deadlock etc. If your callback functions do nothing but increment atomic counters of your own, then there is no problem.