From fd76798927ef50bba8f98e49387d8b36b13109e1 Mon Sep 17 00:00:00 2001 From: Nicholas Corgan Date: Tue, 29 Oct 2013 09:21:12 -0700 Subject: Removed GCC-specific attribute for unused parameters * This broke MSVC builds due to incompatibility * Added new UHD_UNUSED(x) macro in --- host/include/uhd/config.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'host/include') diff --git a/host/include/uhd/config.hpp b/host/include/uhd/config.hpp index 6fd2932cf..619bd0787 100644 --- a/host/include/uhd/config.hpp +++ b/host/include/uhd/config.hpp @@ -55,18 +55,21 @@ typedef ptrdiff_t ssize_t; #define UHD_INLINE __forceinline #define UHD_DEPRECATED __declspec(deprecated) #define UHD_ALIGNED(x) __declspec(align(x)) + #define UHD_UNUSED(x) x #elif defined(__GNUG__) && __GNUG__ >= 4 #define UHD_EXPORT __attribute__((visibility("default"))) #define UHD_IMPORT __attribute__((visibility("default"))) #define UHD_INLINE inline __attribute__((always_inline)) #define UHD_DEPRECATED __attribute__((deprecated)) #define UHD_ALIGNED(x) __attribute__((aligned(x))) + #define UHD_UNUSED(x) x __attribute__((unused)) #else #define UHD_EXPORT #define UHD_IMPORT #define UHD_INLINE inline #define UHD_DEPRECATED #define UHD_ALIGNED(x) + #define UHD_UNUSED(x) x #endif // Define API declaration macro -- cgit v1.2.3 From 39acb1ef1701671f47f8712320af351aa16050e3 Mon Sep 17 00:00:00 2001 From: Michael West Date: Fri, 1 Nov 2013 16:27:02 -0700 Subject: Changed reusable_barrier default size to 0 to make default behavior provide protection for multiple threads. Changed member initialization of other constructor. --- host/include/uhd/utils/atomic.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'host/include') diff --git a/host/include/uhd/utils/atomic.hpp b/host/include/uhd/utils/atomic.hpp index 5f0a056d2..55769d2fd 100644 --- a/host/include/uhd/utils/atomic.hpp +++ b/host/include/uhd/utils/atomic.hpp @@ -78,11 +78,9 @@ namespace uhd{ class UHD_API reusable_barrier{ public: - reusable_barrier():_size (1) {} + reusable_barrier():_size (0) {} - reusable_barrier(const size_t size) { - _size = size; - } + reusable_barrier(const size_t size):_size(size) {} //! Resize the barrier for N threads void resize(const size_t size){ -- cgit v1.2.3