c - does read / write atomicity hold on multi-computer memory? -
i'm working in multi-computer environment 2 computers access same memory on 32bit pci bus. the first computer write 32bit int. *int_pointer = number; the second computer read 32bit int. number = *int_pointer; both os's / cpu's 32bit architecture. computer pci intel based. computer on pci card power pc. the case worried if write computer changing variable @ same time read computer reading it, causing invalid data read computer. i'd know if atomicity of reading / writing same position in memory preserved on multiple computers. if so, following prevent race condition: number = *int_pointer; while(*int_pointer != number) { number = *int_pointer; } i can guarantee writes occur every 16ms*, , reads occur randomly. *times drift since both computers have different timers. there isn't enough information answer definitively. if either of cpus decide cache memory @ *int_pointer , fail , code not fix race condition. assuming both cpus k...