lkml.org 
[lkml]   [2008]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [ANNOUNCE] Merkey's Kernel Debugger
jmerkey@wolfmountaingroup.com wrote:
>>> Also, whoever wrote "/Documentation/volatiles_are_evil" must not have
>>> worked with the busted-ass GNU compiler that optimizes away global
>>> variables and busts SMP dependent code. I am not going to remove the
>> The Linux way to handle this is to use gcc memory barriers.
>> mb()/barrier()/wmb()/rmb()/smp_rmb()/smp_wmb() etc.
>> Normally everything that volatile can do can be expressed by them.
[...]
>> See Documentation/memory-barriers.txt
[...]
> I'll instrument this as described in the documentation you referenced and
> remove the volatile declarations. If this passes testing, I will repost
> with these corections.

Take care though that neither memory barriers nor volatile are what you
want if accesses need to be atomic on whatever given data structure.
(E.g. bitfield manipulations, counter increments, accesses to virtually
anything that is bigger than an integer or a pointer...)
--
Stefan Richter
-=====-==--- =--- --===
http://arcgraph.de/sr/


\
 
 \ /
  Last update: 2008-08-07 19:07    [W:0.060 / U:20.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site