Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Sep 1996 19:22:16 -0700
From:      "David E. Tweten" <tweten@frihet.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        current@freebsd.org
Subject:   Re: fixing accesses to volatile variable `time' 
Message-ID:  <199609060222.TAA05756@ns.frihet.com>

next in thread | raw e-mail | index | archive | help
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.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609060222.TAA05756>