]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: time: Use the new _HA_ATOMIC_* macros.
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 8 Mar 2019 17:55:31 +0000 (18:55 +0100)
committerOlivier Houchard <cognet@ci0.org>
Mon, 11 Mar 2019 16:02:38 +0000 (17:02 +0100)
Use the new _HA_ATOMIC_* macros and add barriers where needed.

src/time.c

index 8f9b94341331a54c816d4dd0ec1d46fdabf41d05..cd042dee622322983bd36388f5fa67c7418173cb 100644 (file)
@@ -230,7 +230,7 @@ REGPRM2 void tv_update_date(int max_wait, int interrupted)
                new_now = (((unsigned long long)tmp_adj.tv_sec) << 32) + (unsigned int)tmp_adj.tv_usec;
 
                /* let's try to update the global <now> or loop again */
-       } while (!HA_ATOMIC_CAS(&global_now, &old_now, new_now));
+       } while (!_HA_ATOMIC_CAS(&global_now, &old_now, new_now));
 
        adjusted = tmp_adj;