On Wed, Jan 23, 2002 at 02:56:34PM +0900, Machida Hiroyuki wrote: > > It should in principle be SMP safe. > > I don't think so. > > Suppose that > THREAD A is bound to CPU A and THREAD B is bound to CPU B. > THREAD A and THREAD B are running on_atomic_inc_nollsc(). > Two threads are really running at the same time, without > context-switch. In this case nobody clear k1. There is a method for mutual exclusion called Dekker's Algorithem (sp?) which only requires just atomic stores and can be implemented in plain C. Downside is it's weak performance that renders it pretty much a CS only thing. Ralf