LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
LinkBack Search this Thread
Old 03-23-2011, 10:21 AM   #1
littertiger
LQ Newbie
 
Registered: Sep 2004
Posts: 5

Rep: Reputation: 0
Question why lock protected var without volatile?


In linux kernel, semaphore/spin_lock protected var normally don't labelled as volatile. Why? var should prevent compiler to put it in register, correct?
 
Old 03-25-2011, 04:44 PM   #2
accessory2008
LQ Newbie
 
Registered: Mar 2011
Posts: 9

Rep: Reputation: 4
No. Most variables are on the stack in the memory.
 
  


Reply

Tags
lock


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) phreakshew Linux - Newbie 16 02-15-2012 12:28 PM
Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied) basina Linux - Laptop and Netbook 3 09-05-2011 05:18 PM
open lock file /var/lib/postfix/master.lock: cannot open file: Permission denied gabsik Linux - Server 5 05-23-2011 09:40 AM
Could not get lock /var/lib/dpkg/lock thelonius Debian 5 07-31-2006 07:48 PM
/var/lock/subsys/ stefaandk Linux - Newbie 2 07-21-2005 07:27 PM


All times are GMT -5. The time now is 12:51 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration