home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / linux / 21792 < prev    next >
Encoding:
Text File  |  1992-12-27  |  1.4 KB  |  32 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!think.com!enterpoop.mit.edu!bloom-picayune.mit.edu!daemon
  3. From: tytso@ATHENA.MIT.EDU (Theodore Ts'o)
  4. Subject: Re: .98.5 and .98.6: Infinite loop trying to init SMC Elite16
  5. Message-ID: <1992Dec27.063154.9679@athena.mit.edu>
  6. Sender: daemon@athena.mit.edu (Mr Background)
  7. Reply-To: tytso@ATHENA.MIT.EDU (Theodore Ts'o)
  8. Organization: The Internet
  9. Date: Sun, 27 Dec 1992 06:31:54 GMT
  10. Lines: 20
  11.  
  12.    From: becker@super.org (Donald J. Becker)
  13.    Date: Wed, 9 Dec 1992 03:18:03 GMT
  14.  
  15.    In the Linux world "volatile" is likely to see little use.  It was
  16.    intended to allow C to safely access memory-mapped devices, and allow
  17.    setjmp(), longjmp() and interrupt handlers to set non-local variables.
  18.    Many people claim that it succeeds only at the latter.  The PC world
  19.    has few memory-mapped devices.  Video memory and a few ethercards are
  20.    the only ones I can think of offhand.  Most devices are in the I/O
  21.    space which is implicitly non-cached and volatile
  22.  
  23. The use of volatile where you have a variable which could be modified
  24. out from underneath the running code by an interrupt routine actually
  25. happens a number of times inside the Linux kernel; if you are writing a
  26. device driver, you may very well use such a feature.  As an example,
  27. look at how rs_irq_triggered is used in kernel/chr_drv/serial.c, or how
  28. "jiffies" is used (defined in kernel/sched.c, and used all over the
  29. place).
  30.  
  31.                         - Ted
  32.