Subj : Re: Memory synchronization with pthreads To : comp.programming.threads From : David Hopwood Date : Wed Jan 19 2005 09:50 pm Joseph Seigh wrote: > Alexander Terekhov wrote: >> Joseph Seigh wrote: >> [...] >> >>> > It does not say "if you registered an at fork handler with >>> > pthread_atfork() AND the handler invoked pthread functions that >>> > synchronized memory". >>> >>> fork shouldn't be in that list. >> >> Wrong. In release consistency speak, fork() has "release->acquire" >> msync semantics with respect to the calling thread and the initial >> thread in the created process. The fact that the copy "is made" >> (COW aside for a moment) is pretty much irrelevant. > > release/acquire only has meaning for shared memory. The forked process > doesn't share memory. Not in "traditional Unix", but it can in POSIX. In current POSIX almost all scheduling and shared memory semantics are defined in terms of threads; processes are a sort of epiphenomenon. -- David Hopwood .