From: Theodore Ts'o (tytso@ATHENA.MIT.EDU)
Date: 12/27/92


From: tytso@ATHENA.MIT.EDU (Theodore Ts'o)
Subject: Re: .98.5 and .98.6: Infinite loop trying to init SMC Elite16
Date: Sun, 27 Dec 1992 06:31:54 GMT


   From: becker@super.org (Donald J. Becker)
   Date: Wed, 9 Dec 1992 03:18:03 GMT

   In the Linux world "volatile" is likely to see little use. It was
   intended to allow C to safely access memory-mapped devices, and allow
   setjmp(), longjmp() and interrupt handlers to set non-local variables.
   Many people claim that it succeeds only at the latter. The PC world
   has few memory-mapped devices. Video memory and a few ethercards are
   the only ones I can think of offhand. Most devices are in the I/O
   space which is implicitly non-cached and volatile

The use of volatile where you have a variable which could be modified
out from underneath the running code by an interrupt routine actually
happens a number of times inside the Linux kernel; if you are writing a
device driver, you may very well use such a feature. As an example,
look at how rs_irq_triggered is used in kernel/chr_drv/serial.c, or how
"jiffies" is used (defined in kernel/sched.c, and used all over the
place).

                                                - Ted