summaryrefslogtreecommitdiffstats
path: root/include/spinlock/dec.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-07-23 11:28:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-07-23 11:28:52 +0000
commitcca122ce9a0e5c8ebe745b6ae785b5b5c80f4fc6 (patch)
treeed241f8b8e5344df624226d5217cccec5e84329a /include/spinlock/dec.h
parentAdding upstream version 0.6.0. (diff)
downloadck-upstream/0.7.1.tar.xz
ck-upstream/0.7.1.zip
Adding upstream version 0.7.1.upstream/0.7.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'include/spinlock/dec.h')
-rw-r--r--include/spinlock/dec.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/spinlock/dec.h b/include/spinlock/dec.h
index 11d36dd..3e36bf7 100644
--- a/include/spinlock/dec.h
+++ b/include/spinlock/dec.h
@@ -111,7 +111,8 @@ ck_spinlock_dec_lock_eb(struct ck_spinlock_dec *lock)
if (r == true)
break;
- ck_backoff_eb(&backoff);
+ while (ck_pr_load_uint(&lock->value) != 1)
+ ck_backoff_eb(&backoff);
}
ck_pr_fence_lock();