volatile

Henry Spencer henry at utzoo.uucp
Wed Apr 6 07:30:59 AEST 1988


> What about signal handlers?

I'm only gonna say this one more time:  just about the only fully portable
thing a signal handler can do is set a flag.  Not just any flag, but a
flag of type sig_atomic_t, defined in <signal.h> in an ANSI C implementation.
Since sig_atomic_t can be as magic as necessary, volatile isn't *really*
needed here.  (I concede that it is useful in some classes of semi-portable
code.)
-- 
"Noalias must go.  This is           |  Henry Spencer @ U of Toronto Zoology
non-negotiable."  --DMR              | {allegra,ihnp4,decvax,utai}!utzoo!henry



More information about the Comp.lang.c mailing list