From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 3 21:00:57 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4E2D87D for ; Wed, 3 Jun 2015 21:00:57 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from mail.embedded-brains.de (host-82-135-62-35.customer.m-online.net [82.135.62.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 800DA1A1C for ; Wed, 3 Jun 2015 21:00:56 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 7B5862A1939; Wed, 3 Jun 2015 23:00:56 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id B62Wc92hibfz; Wed, 3 Jun 2015 23:00:54 +0200 (CEST) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 12AD82A1962; Wed, 3 Jun 2015 23:00:54 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id yCJ-JgxUSI6t; Wed, 3 Jun 2015 23:00:53 +0200 (CEST) Received: from zimbra.eb.localhost (zimbra.eb.localhost [192.168.96.204]) by mail.embedded-brains.de (Postfix) with ESMTP id EF3692A1939; Wed, 3 Jun 2015 23:00:53 +0200 (CEST) Date: Wed, 3 Jun 2015 23:00:53 +0200 (CEST) From: Sebastian Huber To: Joerg Sonnenberger Cc: freebsd-hackers@freebsd.org Message-ID: <2023236942.13088.1433365253885.JavaMail.zimbra@embedded-brains.de> In-Reply-To: <20150603203228.GA9774@britannica.bec.de> References: <1433331966-27548-1-git-send-email-sebastian.huber@embedded-brains.de> <20150603203228.GA9774@britannica.bec.de> Subject: Re: [PATCH] timecounters: Fix timehand generation read/write MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [192.168.102.3] X-Mailer: Zimbra 8.6.0_GA_1153 (zclient/8.6.0_GA_1153) Thread-Topic: timecounters: Fix timehand generation read/write Thread-Index: sIVYr1uuEJoSO7ZaiWVuDVOsoSEraA== X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2015 21:00:57 -0000 In my interpretation of the C standard this is implementation defined behav= iour. See also: https://gcc.gnu.org/onlinedocs/gcc/Volatiles.html ----- Joerg Sonnenberger schrieb: > On Wed, Jun 03, 2015 at 01:46:06PM +0200, Sebastian Huber wrote: > > The compiler is free to re-order load/store instructions to non-volatil= e > > variables around a load/store of a volatile variable. >=20 > This part is wrong. The *compiler* is not free to do such reorder. The > CPU may, as it doesn't really care about volatile. >=20 > Joerg > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " --=20 Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber at embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine gesch=C3=A4ftliche Mitteilung im Sinne des EHUG.