pradeep singh wrote:
>
> Sorry, for my misunderstanding but i hope Jonathan actually means
> volatile harmful only in C and not while using extended asm with gcc? Or
> does you all consider volatile while using extended asm as harmful too?
> Incidentally i came to know that using volatile in such
Jan Engelhardt wrote:
>>>
>>> turns up no less than 1106+2 hits.
>> You forgot to exclude instances with "asm" in them.
>
> You can do that.
>
I can. 54.2% of those hits were "asm", and therefore require the
"register" keyword.
-hpa
-
To unsubscribe from this list: send the line "unsub
On May 10 2007 14:45, H. Peter Anvin wrote:
>Jan Engelhardt wrote:
>> On May 10 2007 14:20, Jonathan Corbet wrote:
>>> Who knew a documentation patch would get so many reviews? I like it...
>>
>> And the next thing is register-considered-harmful.txt. Running
>>
>> grep -Pr '\bregister\s+(u
On 5/11/07, Johannes Stezenbach <[EMAIL PROTECTED]> wrote:
On Fri, May 11, 2007 at 02:08:54AM +0530, jimmy bahuleyan wrote:
> Jonathan Corbet wrote:
> [snip..]
> > +
> > + - The jiffies variable is special in that it can have a different value
> > +every time it is referenced, but it can be
Johannes Stezenbach wrote:
> On Fri, May 11, 2007 at 02:08:54AM +0530, jimmy bahuleyan wrote:
>> Jonathan Corbet wrote:
>> [snip..]
>>> +
>>> + - The jiffies variable is special in that it can have a different value
>>> +every time it is referenced, but it can be read without any special
>>> +
On Fri, May 11, 2007 at 02:08:54AM +0530, jimmy bahuleyan wrote:
> Jonathan Corbet wrote:
> [snip..]
> > +
> > + - The jiffies variable is special in that it can have a different value
> > +every time it is referenced, but it can be read without any special
> > +locking. So jiffies can be
Jonathan Corbet wrote:
> +The key point to understand with regard to volatile is that its purpose is
> +to suppress optimization, which is almost never what one really wants to
> +do. In the kernel, one must protect shared data structures against
> +unwanted concurrent access, which is very much a
In article <[EMAIL PROTECTED]> you wrote:
> +Consider a typical block of kernel code:
> +
> +spin_lock(&the_lock);
> +do_something_on(&shared_data);
> +do_something_else_with(&shared_data);
> +spin_unlock(&the_lock);
> +
> +If all the code follows the locking rules, the value of sha
Hello!
On Thu, May 10, 2007 at 02:20:19PM -0600, Jonathan Corbet wrote:
...
> +++ b/Documentation/volatile-considered-harmful.txt
...
> +Consider a typical block of kernel code:
> +
> +spin_lock(&the_lock);
> +do_something_on(&shared_data);
^^^
> +do_som
Jan Engelhardt wrote:
> On May 10 2007 14:20, Jonathan Corbet wrote:
>> Who knew a documentation patch would get so many reviews? I like it...
>
> And the next thing is register-considered-harmful.txt. Running
>
> grep -Pr '\bregister\s+(unsigned|char|short|int|long|float|
> double|s
On 5/11/07, jimmy bahuleyan <[EMAIL PROTECTED]> wrote:
Jonathan Corbet wrote:
[snip..]
> +
> + - The jiffies variable is special in that it can have a different value
> +every time it is referenced, but it can be read without any special
> +locking. So jiffies can be volatile, but the a
On May 10 2007 14:20, Jonathan Corbet wrote:
>
>Who knew a documentation patch would get so many reviews? I like it...
And the next thing is register-considered-harmful.txt. Running
grep -Pr '\bregister\s+(unsigned|char|short|int|long|float|
double|struct|union|uint|u\d+|s\d+)\b
Jonathan Corbet wrote:
[snip..]
> +
> + - The jiffies variable is special in that it can have a different value
> +every time it is referenced, but it can be read without any special
> +locking. So jiffies can be volatile, but the addition of other
> +variables of this type is strongl
Who knew a documentation patch would get so many reviews? I like it...
Anyway, here's a new version in which I attempt to respond to all the
comments that came in. Thanks to everybody for looking it over.
jon
Steer developers away from the volatile type.
Signed-off-by: Jonathan Corbet <[EMAIL
14 matches
Mail list logo