From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.lisp.guile.devel Subject: Re: What are the arguments in favor of delay/force in eval.c? Date: Wed, 07 Dec 2005 17:28:10 -0800 Message-ID: <878xuwl6mt.fsf@trouble.defaultvalue.org> References: <87hd9mgc7v.fsf@trouble.defaultvalue.org> <87acfcfvbr.fsf@zip.com.au> <87y82wo78b.fsf@trouble.defaultvalue.org> <41321ED5-8534-46C0-9A8A-D532203FC8F9@raeburn.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1134005610 3189 80.91.229.2 (8 Dec 2005 01:33:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Dec 2005 01:33:30 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Dec 08 02:33:24 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EkAdA-0004Ji-96 for guile-devel@m.gmane.org; Thu, 08 Dec 2005 02:31:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EkAdQ-0001Sy-5W for guile-devel@m.gmane.org; Wed, 07 Dec 2005 20:31:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EkAaF-0006rH-UC for guile-devel@gnu.org; Wed, 07 Dec 2005 20:28:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EkAaE-0006q6-Td for guile-devel@gnu.org; Wed, 07 Dec 2005 20:28:31 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EkAaE-0006pY-Eu for guile-devel@gnu.org; Wed, 07 Dec 2005 20:28:30 -0500 Original-Received: from [70.85.129.156] (helo=defaultvalue.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EkAbA-0000OC-G0 for guile-devel@gnu.org; Wed, 07 Dec 2005 20:29:28 -0500 Original-Received: from omen.defaultvalue.org (localhost [127.0.0.1]) by defaultvalue.org (Postfix) with ESMTP id 5312091252; Wed, 7 Dec 2005 19:28:12 -0600 (CST) Original-Received: from trouble.defaultvalue.org (omen.defaultvalue.org [192.168.1.1]) by omen.defaultvalue.org (Postfix) with ESMTP id F410B410E; Wed, 7 Dec 2005 17:28:11 -0800 (PST) Original-Received: by trouble.defaultvalue.org (Postfix, from userid 1000) id 4265B3C1001; Wed, 7 Dec 2005 17:28:10 -0800 (PST) Original-To: Ken Raeburn In-Reply-To: <41321ED5-8534-46C0-9A8A-D532203FC8F9@raeburn.org> (Ken Raeburn's message of "Wed, 7 Dec 2005 19:57:58 -0500") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) 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 Xref: news.gmane.org gmane.lisp.guile.devel:5492 Archived-At: Ken Raeburn writes: > Of course, the compiler might reorder these accesses, unless you > make everything volatile. Even then, the CPU still might reorder > them so another compiler might see something different. I'd be > worried about the reordering or caching in another processor if the > code decides it can bypass all the mutex stuff, too. > > Once every thread agrees on the new data value and no mutex needed, > everything should be fine, but managing the transition to that state > (without adding *another* mutex) is very tricky. Yeah. I definitely wondered if there was a way to do it completely safely without full protection. I'm always hesitant about code that relies on so many assumptions, though I (obviously) wasn't thinking about the reordering issues. (Of course, I pretty much always fully protect things in real code, so it's not an issue...) > Actually, I think some memory models will allow some accesses to be > moved into the region where the lock is held from outside it. Interesting. Thanks -- Rob Browning rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel