aboutsummaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_keys.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchange/taler-exchange-httpd_keys.c')
-rw-r--r--src/exchange/taler-exchange-httpd_keys.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/exchange/taler-exchange-httpd_keys.c b/src/exchange/taler-exchange-httpd_keys.c
index f37aafbd1..3b5616345 100644
--- a/src/exchange/taler-exchange-httpd_keys.c
+++ b/src/exchange/taler-exchange-httpd_keys.c
@@ -344,9 +344,7 @@ static struct TEH_KeyStateHandle *key_state;
344 344
345/** 345/**
346 * Counter incremented whenever we have a reason to re-build the keys because 346 * Counter incremented whenever we have a reason to re-build the keys because
347 * something external changed (in another thread). The counter is manipulated 347 * something external changed (in another thread). See #TEH_keys_get_state() and
348 * using an atomic update, and thus to ensure that threads notice when it
349 * changes, the variable MUST be volatile. See #TEH_keys_get_state() and
350 * #TEH_keys_update_states() for uses of this variable. 348 * #TEH_keys_update_states() for uses of this variable.
351 */ 349 */
352static uint64_t key_generation; 350static uint64_t key_generation;
@@ -1721,8 +1719,7 @@ build_key_state (struct HelperState *hs,
1721void 1719void
1722TEH_keys_update_states () 1720TEH_keys_update_states ()
1723{ 1721{
1724 __sync_fetch_and_add (&key_generation, 1722 key_generation++;
1725 1);
1726 TEH_resume_keys_requests (false); 1723 TEH_resume_keys_requests (false);
1727} 1724}
1728 1725