Skip to content
Snippets Groups Projects
Commit cb4eab2a authored by James Willis's avatar James Willis
Browse files

No need to take the minimum when updating a root.

parent 14e67e8f
No related branches found
No related tags found
1 merge request!543Fof
...@@ -185,7 +185,7 @@ __attribute__((always_inline)) INLINE static size_t update_root( ...@@ -185,7 +185,7 @@ __attribute__((always_inline)) INLINE static size_t update_root(
old_val = *address; old_val = *address;
test_val = old_val; test_val = old_val;
new_val = min(old_val, y); new_val = y;
/* atomic_cas returns old_val if *size_t_ptr has not changed since being read.*/ /* atomic_cas returns old_val if *size_t_ptr has not changed since being read.*/
old_val = atomic_cas(size_t_ptr, test_val, new_val); old_val = atomic_cas(size_t_ptr, test_val, new_val);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment