home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.aix
- Path: sparky!uunet!paladin.american.edu!howland.reston.ans.net!usc!sdd.hp.com!saimiri.primate.wisc.edu!ames!agate!linus!philabs!acheron!scifi!watson!yktnews!admin!yktnews!prener
- From: prener@watson.ibm.com (Dan Prener)
- Subject: Re: optimisation and volatile
- Sender: news@watson.ibm.com (NNTP News Poster)
- Message-ID: <PRENER.93Jan7234844@prener.watson.ibm.com>
- In-Reply-To: phil@dhcs.demon.co.uk's message of Thu, 7 Jan 1993 14:52:33 +0000
- Date: Fri, 8 Jan 1993 04:48:44 GMT
- Disclaimer: This posting represents the poster's views, not necessarily those of IBM
- References: <PHIL.93Jan7143750@lurch.dhcs.demon.co.uk>
- Nntp-Posting-Host: prener.watson.ibm.com
- Organization: IBM T.J. Watson Research Center, Hawthorne, New York
- Lines: 16
-
- In article <PHIL.93Jan7143750@lurch.dhcs.demon.co.uk> phil@dhcs.demon.co.uk (phil) writes:
-
- > Can anyone help with this. We are building code which uses shared memory
- > heavily for interprocess communication. Everything works great, but now we
- > would like to compile the code with -O optimization. The last time we tried
- > this the compiler would remove repeated shared memory reads with no intervening
- > writes, which makes use for IPC a little fraught!
-
- > gcc has a switch `-fvolatile' : Consider all memory references through pointers
- > to be volatile.
-
- > Is there an equivalent for xlc?
-
- Declare the pointers as pointers to volatile objects?
- --
- Dan Prener (prener@watson.ibm.com)
-