noalias comments to X3J11

David Collier-Brown daveb at geac.UUCP
Thu Mar 31 13:04:29 AEST 1988


In article <1988Mar25.172355.348 at utzoo.uucp> henry at utzoo.uucp (Henry Spencer) writes:
| Interrupt routines are almost by definition esoteric, not to mention highly
| machine-specific.

In article <597 at tuvie> rcvie at tuvie.UUCP (D. Weickert) writes:
| Signal handlers will be at least very similar to interrupt routines. Still it
| does not seem to be esoteric to me, if I set a flag in such a handler. And now
| please tell me, how to tell the compiler it must not `optimize' the access to
| this flag?

Well, they're interrupt-like in style, but not always in nature.  It
is probably true that some machine and operating system somewhere on
this net has signals which run asynchronously to the rest of the
program, but in general they are executed in the normal context of
a C program, as a (simulated, perhaps) subroutine call and strictly
synchronously with the rest of the program.  The CP/M machine I'm
using to write this posting from has signal handlers and dispatchers
in the great majority of its C programs: written by Drew Sullivan
(drew at lethe) many moons ago.

 And you don't, therefore have to do anything to the said flag
variable.  Except make it accessable.
-- 
 David Collier-Brown.                 {mnetor yunexus utgpu}!geac!daveb
 Geac Computers International Inc.,   |  Computer Science loses its
 350 Steelcase Road,Markham, Ontario, |  memory (if not its mind) 
 CANADA, L3R 1B3 (416) 475-0525 x3279 |  every 6 months.



More information about the Comp.lang.c mailing list