Re: why the barrier() can not take effect?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I don't know why you'd expect a difference, really.  Try this:

I just want to know precisely what measures the gcc take when a asm
statement including a clobber of "memory", rather merely than a
general description in the gcc manual. In Linux kernel code, the
barrier() appears frequently in some kernel funcitons. So, I wish to
get the exactly meaning of the barrier().

> int s = 0;

So, just the variables which might be modified by some outer code
unpredictable, such as interrupt handlers, other processes, etc, will
be given more cares by the gcc. But, we need not to worry about
whether or not a local variable in some function is consistent with
the corresponding register, because it is impossible that a local
variable will be modified outside the current code. Is that true?



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux