summaryrefslogtreecommitdiffstats
path: root/cas.c
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2010-01-06 22:36:54 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2010-01-06 22:36:54 +0100
commit141b9946e039e25cb9e79c581639caa00f442ab5 (patch)
treedd40107e32280a8c35ddd966d91c03e869677f13 /cas.c
parent174afdb2c0eb0e418980c1fa1c0afe41277b5b4d (diff)
downloadlock_free-141b9946e039e25cb9e79c581639caa00f442ab5.zip
lock_free-141b9946e039e25cb9e79c581639caa00f442ab5.tar.gz
maintenance
Diffstat (limited to 'cas.c')
-rw-r--r--cas.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cas.c b/cas.c
index 910a56d..1f83ca5 100644
--- a/cas.c
+++ b/cas.c
@@ -67,16 +67,19 @@ static inline unsigned int cas( volatile split_t *mem,
int test_compare_and_swap () {
pointer_t mem, old, new;
+ new.concat = old.concat = 0;
return compare_and_swap(&mem.concat, old.concat, new.concat);
}
int test_cas () {
pointer_t mem, old, new;
+ new.concat = old.concat = 0;
return cas(&mem.split, old.split, new.split);
}
void check_assign_a() {
pointer_t a, b;
+ b.concat = 0;
a.concat = b.concat;
}