From: "Dinesh Gandhewar" <dinesh_gandhewar@rediffmail.com>
To: mlist-linux-kernel@nntp-server.caltech.edu
Subject: volatile variable
Date: 1 Aug 2003 10:57:06 -0000 [thread overview]
Message-ID: <20030801105706.30523.qmail@webmail28.rediffmail.com> (raw)
Hello,
If a system call is having following code.
add current process into wait quque ;
while (1)
{ set task state INTERRUPTIBLE ;
if (a > 0)
break ;
schedule() ;
}
set task state RUNNING ;
remove current from wait queue ;
If an interrupt service is having following code
set a = 512 ;
'a' is a global variable shared in ISR and system call
Do I need to define a as 'volatile int a ;' ? Why?
Thanks & Regards,
Dinesh
___________________________________________________
Download the hottest & happening ringtones here!
OR SMS: Top tone to 7333
Click here now:
http://sms.rediff.com/cgi-bin/ringtone/ringhome.pl
next reply other threads:[~2003-08-01 10:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-01 10:57 Dinesh Gandhewar [this message]
2003-08-01 11:38 ` volatile variable Richard B. Johnson
2003-08-11 13:33 ` David Woodhouse
2003-08-11 14:06 ` Richard B. Johnson
2003-08-11 14:37 ` Jakub Jelinek
2003-08-11 14:38 ` David Woodhouse
2003-08-11 14:40 ` David Howells
2003-08-11 14:49 ` Mike Galbraith
2003-08-11 17:07 ` Robert Love
2003-08-02 14:52 Harm Verhagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030801105706.30523.qmail@webmail28.rediffmail.com \
--to=dinesh_gandhewar@rediffmail.com \
--cc=mlist-linux-kernel@nntp-server.caltech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).