Skip to content

Commit

Permalink
Relax atomic operations on performance counter values
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Jan 8, 2018
1 parent 75729c1 commit b68bc9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hpx/util/get_and_reset_value.hpp
Expand Up @@ -31,9 +31,9 @@ namespace hpx { namespace util
template <typename T>
inline T get_and_reset_value(std::atomic<T>& value, bool reset)
{
T result = value.load();
T result = value.load(std::memory_order_consume);
if (reset)
value.store(0);
value.store(0, std::memory_order_release);
return result;
}
}}
Expand Down

0 comments on commit b68bc9c

Please sign in to comment.