Commit Graph

1 Commits

Author SHA1 Message Date
Ben Noordhuis
91d3598475 unix: add atomic-ops.h
Add cmpxchgi(), cmpxchgl() and cpu_relax() functions that we can use
as simple primitives to build spinlocks out of.

PR-URL: https://github.com/libuv/libuv/pull/197
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

[NB: This is a back-port of commit a3c3b37 from the v1.x branch.]
2015-02-11 22:30:38 +01:00