Path: utzoo!yunexus!geac!daveb From: daveb@geac.UUCP (David Collier-Brown) Newsgroups: comp.lang.c Subject: Re: A different view of volatile Message-ID: <2749@geac.UUCP> Date: 16 May 88 12:44:27 GMT Article-I.D.: geac.2749 Posted: Mon May 16 08:44:27 1988 References: <178@wyse.wyse.com> <11369@mimsy.UUCP> <1054@micomvax.UUCP> Reply-To: daveb@geac.UUCP (David Collier-Brown) Organization: Geac Lines: 20 > >In article <178@wyse.wyse.com> mikew@wyse.wyse.com appears to write: > >More than that, volatile is ill-defined *always*: on a machine > >with only halfword load and stores, a fullword `a = 0' is not atomic. In article <1054@micomvax.UUCP> ray@micomvax.UUCP (Ray Dunn) writes: >No....volatile is not ill defined, it is machine dependant, which is what >you would expect it to be. >There is no connection between "volatile" and "atomic", "volatile" does not >imply "semaphore". In the case of a fullword device register on a halfword-fetch machine, the **machine** is ill-defined. Volatile hardly helps. It does help on a halfword device register by ensuring that two reads are done for status = device_register_foo; It remains up to the device designer to make it possible to read the register meaningfully in halves. --dave (please let me NOT work on one of those) c-b