Re[2]: читаем про volatile
От: c-smile Канада http://terrainformatica.com
Дата: 10.01.05 19:51
Оценка: :)
Здравствуйте, MaximE, Вы писали:

Ну если ты не веришь хлопцам от MS, то вот тебе от GCC

Atomicity

.....Worse still, "smart" compilers like GCC will often perform optimizations that could eliminate the memory operations needed to ensure that other processors can see what this processor has done. Fortunately, both these problems can be remedied... leaving only the relationship between access efficiency and cache line size for us to worry about.

Volatility

To prevent GCC's optimizer from buffering values of shared memory objects in registers, all objects in shared memory should be declared as having types with the volatile attribute. If this is done, all shared object reads and writes that require just one word access will occur atomically.


И дальше по теме "Linux Parallel Processing HOWTO"
http://howtos.linux.com/howtos/Parallel-Processing-HOWTO-2.shtml

(свой зуб шли заказным письмом)
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.