Xref: utzoo comp.lang.c:10592 comp.arch:5075
Path: utzoo!dciem!nrcaer!scs!spl1!laidbak!att!ihnp4!ihlpf!nevin1
From: nevin1@ihlpf.ATT.COM (00704a-Liber)
Newsgroups: comp.lang.c,comp.arch
Subject: Re: volatile (in comp.lang.c)
Message-ID: <4922@ihlpf.ATT.COM>
Date: 2 Jun 88 01:17:15 GMT
Article-I.D.: ihlpf.4922
References: <20345@pyramid.pyramid.com> <833@mcdsun.UUCP> <1988May23.003847.1114@utzoo.uucp> <1078@micomvax.UUCP>
Reply-To: nevin1@ihlpf.UUCP (00704a-Liber,N.J.)
Followup-To: comp.lang.c
Organization: AT&T Bell Laboratories - Naperville, Illinois
Lines: 22

In article <1078@micomvax.UUCP> ray@micomvax.UUCP (Ray Dunn) writes:
|In article <1988May23.003847.1114@utzoo.uucp> (Henry Spencer) writes:

|>Unfortunately, this is not sufficient.  "Volatile" does not guarantee
|>that operations are atomic.  It is entirely possible for x and/or y to
|>contain trash because they caught the variable midway through the
|>assignment.

|Fortunately this is sufficient when the programmer understands what he is
|programming, and chooses data types etc which will ensure atomicity, if that
|is what he is trying to achieve.

C itself does not guarantee that access to any particular data type,
including char, is atomic.  My question is:  is there *any* use for 'volatile'
which does not require 'atomicity' at some level?  If not, then 'volatile'
doesn't really fix any of the problems we have without it.

-- 
 _ __			NEVIN J. LIBER	..!ihnp4!ihlpf!nevin1	(312) 510-6194
' )  )				You are in a little twisting maze of
 /  / _ , __o  ____		 email paths, all different.
/  (_