diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/platform/posix/posix_atomic.c | 10 | ||||
| -rw-r--r-- | src/platform/posix/posix_impl.h | 4 |
2 files changed, 7 insertions, 7 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; diff --git a/src/platform/posix/posix_impl.h b/src/platform/posix/posix_impl.h index a1cb62c5..e09be87e 100644 --- a/src/platform/posix/posix_impl.h +++ b/src/platform/posix/posix_impl.h @@ -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 @@ -96,7 +96,7 @@ struct nni_atomic_flag { bool f; }; -struct nni_atomic_bol { +struct nni_atomic_bool { bool b; }; |
