Re: Qeustion about memory barrier in sys_getppid() system call .

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

 





On 7/19/07, Henrik Austad <henrik.austad@xxxxxxxxx > wrote:
Please correct me if I have this all wrong but,

> First, be aware that the barrier is done only when SMP support *or* full
> kernel level preemption is enabled.

isn't the barrier also for the compiler? IIRC, gcc reorder instructions in an
attempt to optimize code. A memory-barrier will effectively stop the compiler
for mixing code from before the barrier into the code afterwards.

Yes, Even compilers can play around with the value trying to optimize code. So AFAIK barriers work as hints to the compilers too...

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ




--
The box said "Requires Windows Vista or better." So I installed LINUX

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux