From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Raeburn Newsgroups: gmane.lisp.guile.devel Subject: Re: Code review for thread safeness Date: Mon, 7 Mar 2005 21:18:14 -0600 Message-ID: <6488947bc88c811e8e06efbdf810fe17@raeburn.org> References: <87wtsjw1ro.fsf@zagadka.de> <87fyz75bja.fsf@zip.com.au> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1110253023 27111 80.91.229.2 (8 Mar 2005 03:37:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 8 Mar 2005 03:37:03 +0000 (UTC) Cc: Marius Vollmer , guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Mar 08 04:37:03 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D8VWT-00025R-Q3 for guile-devel@m.gmane.org; Tue, 08 Mar 2005 04:36:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D8Vks-0000bD-4b for guile-devel@m.gmane.org; Mon, 07 Mar 2005 22:51:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D8ViM-0008I0-Ts for guile-devel@gnu.org; Mon, 07 Mar 2005 22:48:59 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D8Vi4-00085W-UP for guile-devel@gnu.org; Mon, 07 Mar 2005 22:48:47 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D8Vhy-0007ui-Jg for guile-devel@gnu.org; Mon, 07 Mar 2005 22:48:34 -0500 Original-Received: from [207.172.4.63] (helo=smtp04.mrf.mail.rcn.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D8VEz-0001Th-Vg for guile-devel@gnu.org; Mon, 07 Mar 2005 22:18:38 -0500 Original-Received: from 216-15-127-174.c3-0.smr-ubr3.sbo-smr.ma.cable.rcn.com (HELO raeburn.org) (216.15.127.174) by smtp04.mrf.mail.rcn.net with ESMTP; 07 Mar 2005 22:18:32 -0500 X-IronPort-AV: i="3.90,145,1107752400"; d="scan'208"; a="8253940:sNHT22256116" Original-Received: from [130.129.134.36] (wireless-130-129-134-36.ietf62.ietf.org [130.129.134.36]) by raeburn.org (8.12.11/8.12.11) with ESMTP id j283IFrR007278; Mon, 7 Mar 2005 22:18:15 -0500 (EST) In-Reply-To: <87fyz75bja.fsf@zip.com.au> Original-To: Kevin Ryde X-Mailer: Apple Mail (2.619.2) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org X-MailScanner-To: guile-devel@m.gmane.org Xref: news.gmane.org gmane.lisp.guile.devel:4826 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:4826 On Mar 7, 2005, at 16:36, Kevin Ryde wrote: >> Also, there are probably many more places that need to become critical >> sections. We need to find them and use SCM_CRITICAL_SECTION_START/END >> or scm_frame_critical_section, as appropriate. > > The ones I've spotted are (I might have posted this before), > > gethostbyname > getpwuid If at all possible, this code should be switched to use get*by*_r, or in the gethostby* cases, perhaps getaddrinfo and getnameinfo. Marking it as a critical section for Guile won't prevent some other thread that is doing no Guile stuff at all from calling gethostbyname or whatever around the same time. Ken _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel