2011/3/22 Timothy Baldridge <[email protected]>: > After my last discussion about getting some multi-threading > primitives, I took a look at how locks are implemented in PyPy. PyPy > currently uses OS level mutexes...which is okay for most uses, but in > my case, I need super fast spinlocks, and for that I need a CAS > operation. What I'm looking for is a bit of direction on how to go > about implementing this function (shown in C syntax): > > int cas(*expected, *new, **location)
I suggest you create a new low-level operation. Then the C backend can translate it into asm. -- Regards, Benjamin _______________________________________________ [email protected] http://codespeak.net/mailman/listinfo/pypy-dev
