From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 10 00:46:03 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 08EAD16A4B3 for ; Fri, 10 Oct 2003 00:46:03 -0700 (PDT) Received: from kientzle.com (h-66-166-149-50.SNVACAID.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 65DE343FEC for ; Fri, 10 Oct 2003 00:45:56 -0700 (PDT) (envelope-from kientzle@acm.org) Received: from acm.org ([66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id h9A7jlkX044947; Fri, 10 Oct 2003 00:45:47 -0700 (PDT) (envelope-from kientzle@acm.org) Message-ID: <3F8663AA.4010707@acm.org> Date: Fri, 10 Oct 2003 00:45:46 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031006 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Harti Brandt References: <20031009194644.50B9116A4BF@hub.freebsd.org> <20031010091003.Q95881@beagle.fokus.fraunhofer.de> In-Reply-To: <20031010091003.Q95881@beagle.fokus.fraunhofer.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: Dynamic reads without locking. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: kientzle@acm.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2003 07:46:03 -0000 Harti Brandt wrote: > Yes. When I read the C standard > foo = data & mask; > wouldn't also help, because there is no sequence point in this statement > except at the ;. Before anyone takes this particular line of reasoning seriously, I feel compelled to point out that sequence points have nothing to do with this. a) Sequence points are an "as if" requirement. The program must produce the same results "as if" it strictly obeyed sequence points. It doesn't have to really operate that way. (And, in fact, well-optimized programs running on modern processors rarely do.) b) Sequence points say NOTHING about how multiple threads or processors interact. Sorry, but the C standard doesn't help here. The C standard does not address multi-threading at all. Tim Kientzle