Fix: lfstack reversed empty/non-empty return value
[urcu.git] / urcu / static / lfstack.h
index fe9e8abe1fe266eeae3d5a3a8fd91187fb8b8d17..b49eb205a45ab3e5f409fc2ee9c490aa04e73e0e 100644 (file)
@@ -118,7 +118,7 @@ bool _cds_lfs_empty(struct cds_lfs_stack *s)
  * always performing an exclusive cacheline access, rather than doing
  * non-exclusive followed by exclusive cacheline access (which would be
  * required if we first read the old head value). This design decision
- * might be revisited after more throrough benchmarking on various
+ * might be revisited after more thorough benchmarking on various
  * platforms.
  *
  * Returns 0 if the stack was empty prior to adding the node.
@@ -148,7 +148,7 @@ bool _cds_lfs_push(struct cds_lfs_stack *s,
                if (old_head == head)
                        break;
        }
-       return ___cds_lfs_empty_head(head);
+       return !___cds_lfs_empty_head(head);
 }
 
 /*
This page took 0.024895 seconds and 4 git commands to generate.