On 28/06/11 11:13, Henry Vermaak wrote:
On 27/06/11 23:31, Andrew Brunner wrote:
AMD vs Intel. Kernels Linux vs Windows. The only way to make sure
How does the kernel matter?
Other than the cpu, compilers can also reorder instructions. You can use
__asm__ __volatile__("": : :"memory") in c to stop gcc from screwing
around with the order, for example. This is of course if a hardware
memory barrier isn't necessary.
you can get code in proper order with regard to memory assignments (
specifically variables) is to use Interlocked methods. This is why
they were designed.
No. You have to use memory barriers for this. Atomic operations are only
useful for single data elements.
To add to this, on x86 the memory barrier is probably implemented with
an atomic instruction.
Henry
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus