diff options
| author | Garrett D'Amore <garrett@damore.org> | 2020-02-05 21:59:11 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2020-02-05 22:04:13 -0800 |
| commit | 8d3b53879bdaf1b1d617a40633a66eea9eb345ef (patch) | |
| tree | 28aef8f89920e78de27f3811ddb19a25bc97ff70 /src/platform/posix/posix_atomic.c | |
| parent | f09cc5ec0940b686f1422cddbdeb53d704b84233 (diff) | |
| download | nng-1.2.6.tar.gz nng-1.2.6.tar.bz2 nng-1.2.6.zip | |
Diffstat (limited to 'src/platform/posix/posix_atomic.c')
| -rw-r--r-- | src/platform/posix/posix_atomic.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/platform/posix/posix_atomic.c b/src/platform/posix/posix_atomic.c index 71ef6262..9358e161 100644 --- a/src/platform/posix/posix_atomic.c +++ b/src/platform/posix/posix_atomic.c @@ -1,5 +1,5 @@ // -// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> // // This software is supplied under the terms of the MIT License, a @@ -134,14 +134,14 @@ nni_atomic_flag_reset(nni_atomic_flag *f) } void -nni_atomic_set_bool(nni_atomic_bool *b) +nni_atomic_set_bool(nni_atomic_bool *b, bool n) { pthread_mutex_lock(&plat_atomic_lock); - b->b = false; + b->b = n; pthread_mutex_unlock(&plat_atomic_lock); } -void +bool nni_atomic_get_bool(nni_atomic_bool *b) { bool v; @@ -151,7 +151,7 @@ nni_atomic_get_bool(nni_atomic_bool *b) return (v); } -void +bool nni_atomic_swap_bool(nni_atomic_bool *b, bool n) { bool v; |
