Find the answer to your Linux question:
Results 1 to 2 of 2
what is the exact use of volatile variables in writing device drivers Source: http://www.thescripts.com/forum/thread575614.html...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2007
    Posts
    27

    Post volatile variable in writing driver


    what is the exact use of volatile variables in writing device drivers

    Source: http://www.thescripts.com/forum/thread575614.html

  2. #2
    Just Joined! letmeknowlinux's Avatar
    Join Date
    Mar 2006
    Posts
    82
    Normal variables { without the 'volatile' type specifier } can be stored in the cache to make the CPU access faster. There might be some situations where you don't want to cache a particular variable and you want to read the variable always from the specified location instead from cache. You declare those kind of variables as volatile.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •