From 8d3b53879bdaf1b1d617a40633a66eea9eb345ef Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 5 Feb 2020 21:59:11 -0800 Subject: fixes #1182 v1.2.5 build fails gcc 4.8 --- src/platform/posix/posix_atomic.c | 10 +++++----- src/platform/posix/posix_impl.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') 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. +// Copyright 2020 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // // 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. +// Copyright 2020 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // // 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; }; -- cgit v1.2.3-70-g09d2