diff options
| author | Garrett D'Amore <garrett@damore.org> | 2019-12-21 11:40:16 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2019-12-24 00:33:44 -0800 |
| commit | 9e7a4aff25139703bbc375b6dda263d6d42341a8 (patch) | |
| tree | ffa6c9b8dc62b748acffd881c28eeee654cae43d /src | |
| parent | c0e2927ffc3b8c6fa34a1ce66bd3a0d7a4d9a52d (diff) | |
| download | nng-9e7a4aff25139703bbc375b6dda263d6d42341a8.tar.gz nng-9e7a4aff25139703bbc375b6dda263d6d42341a8.tar.bz2 nng-9e7a4aff25139703bbc375b6dda263d6d42341a8.zip | |
fixes #1034 POSIX atomic handing default case is busted
Diffstat (limited to 'src')
| -rw-r--r-- | src/platform/posix/posix_atomic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/platform/posix/posix_atomic.c b/src/platform/posix/posix_atomic.c index c445e149..56e2c370 100644 --- a/src/platform/posix/posix_atomic.c +++ b/src/platform/posix/posix_atomic.c @@ -110,7 +110,7 @@ void nni_atomic_add64(nni_atomic_u64 *v, uint64_t bump) { pthread_mutex_lock(&plat_atomic_lock); - v += bump; + v->v += bump; pthread_mutex_unlock(&plat_atomic_lock); } @@ -118,7 +118,7 @@ void nni_atomic_sub64(nni_atomic_u64 *v, uint64_t bump) { pthread_mutex_lock(&plat_atomic_lock); - v -= bump; + v->v -= bump; pthread_mutex_unlock(&plat_atomic_lock); } |
