diff options
Diffstat (limited to 'src/exchange/taler-exchange-httpd_keys.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_keys.c | 7 |
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 | */ |
352 | static uint64_t key_generation; | 350 | static uint64_t key_generation; |
@@ -1721,8 +1719,7 @@ build_key_state (struct HelperState *hs, | |||
1721 | void | 1719 | void |
1722 | TEH_keys_update_states () | 1720 | TEH_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 | ||