Subj : Re: What does Memory Barriers mean ?? To : comp.programming.threads From : Marcin 'Qrczak' Kowalczyk Date : Tue Jan 11 2005 10:11 am "SenderX" writes: > static int global = 0; > > 1. int *local = &global; > 2. pthread_mutex_lock( ... ); > 3. *local = 5; > 4. pthread_mutex_unlock( ... ); > > Since local has never had its address taken, could step 3 possibly > be moved out of the critical section? No, because it's not local which is written but *local. -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/ .