From owner-freebsd-current Thu Sep 5 19:23:22 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id TAA06312 for current-outgoing; Thu, 5 Sep 1996 19:23:22 -0700 (PDT) Received: from ns.frihet.com (root@frihet.bayarea.net [205.219.92.1]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id TAA06307 for ; Thu, 5 Sep 1996 19:23:19 -0700 (PDT) Received: from ns.frihet.com (tweten@localhost [127.0.0.1]) by ns.frihet.com (8.7.5/8.6.12) with ESMTP id TAA05756; Thu, 5 Sep 1996 19:22:16 -0700 (PDT) Message-Id: <199609060222.TAA05756@ns.frihet.com> X-Mailer: exmh version 1.6.7 5/3/96 Reply-To: "David E. Tweten" To: Bruce Evans cc: current@freebsd.org Subject: Re: fixing accesses to volatile variable `time' Date: Thu, 05 Sep 1996 19:22:16 -0700 From: "David E. Tweten" Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk bde@zeta.org.au said: >1. time.tv_sec is long, and accesses to longs are not guaranteed to > be atomic. They happen to be atomic on i386's. To satisfy my curiosity, just who makes this "guarantee?" Obviously, access to a bit is inherently atomic, but I don't recall reading any C language specification indicating that chars, shorts, or int accesses are atomic whereas longs aren't. -- David E. Tweten | 2047-bit PGP Key fingerprint: | tweten@frihet.com 12141 Atrium Drive | E9 59 E7 5C 6B 88 B8 90 | tweten@and.com Saratoga, CA 95070-3162 | 65 30 2A A4 A0 BC 49 AE | (408) 446-4131 Those who make good products sell products; those who don't, sell solutions.