313 Subj : Re: deadlock avoidance To : comp.programming.threads From : Dijkstra Date : Tue Jul 05 2005 01:36 pm Hi there! The Giancarlo article is right: A C function using a global or static variable is surely not reentrant. It may be reentrant if you take great care not to use this variable simultaneously, which will lead you to use some kind of syncronization, killing reentrancy to a great extent. I also agree to the sentence "Every access to shared data must be guarded with a mutex". It is true, period. You can not assure a C sentence is atomic enough, not even a simple assignment -- think of other architectures, not only x86. If you take this to C++, I can count many cases where "a = b" may take hundred lines of micro-code. Cheers, Jose Miguel. . 0