diff options
author | Ori Bernstein <ori@eigenstate.org> | 2015-12-12 02:00:48 -0500 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2015-12-12 02:00:48 -0500 |
commit | 317eb918900dfe2a9e37fcc5acde58400b143f5a (patch) | |
tree | 8a6b7001fca2238c83964c93710f1678719c0686 /lib/thread | |
parent | 306763569e09bc8a6940b54f879a03d3ff8f3b65 (diff) | |
download | mc-317eb918900dfe2a9e37fcc5acde58400b143f5a.tar.gz |
Build under the new init-before-use regime
Diffstat (limited to 'lib/thread')
-rw-r--r-- | lib/thread/mutex+linux.myr | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/thread/mutex+linux.myr b/lib/thread/mutex+linux.myr index 42f9fac..7fd4270 100644 --- a/lib/thread/mutex+linux.myr +++ b/lib/thread/mutex+linux.myr @@ -31,6 +31,7 @@ const mtxlock = {mtx /* Uncontended case: we get an unlocked mutex, and we lock it. */ + c = Locked for var i = 0; i < nspin; i++ c = xcas(&mtx._state, Unlocked, Locked) if c == Unlocked |