diff --git a/.gitmodules b/.gitmodules index 94fa12f4..7726601d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "external/abseil-cpp"] path = external/abseil-cpp url = https://github.com/abseil/abseil-cpp + branch = lts_2020_02_25 diff --git a/external/abseil-cpp b/external/abseil-cpp index 0f86336b..df3ea785 160000 --- a/external/abseil-cpp +++ b/external/abseil-cpp @@ -1 +1 @@ -Subproject commit 0f86336b6939ea673cc1cbe29189286cae67d63a +Subproject commit df3ea785d8c30a9503321a3d35ee7d35808f190d diff --git a/src/external/atomic_queue/atomic_queue.h b/src/external/atomic_queue/atomic_queue.h index 731d9a11..23536adc 100644 --- a/src/external/atomic_queue/atomic_queue.h +++ b/src/external/atomic_queue/atomic_queue.h @@ -28,34 +28,13 @@ namespace details { //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -template -struct GetCacheLineIndexBits { - static int constexpr value = 0; -}; -template<> -struct GetCacheLineIndexBits<64> { - static int constexpr value = 6; -}; -template<> -struct GetCacheLineIndexBits<32> { - static int constexpr value = 5; -}; -template<> -struct GetCacheLineIndexBits<16> { - static int constexpr value = 4; -}; -template<> -struct GetCacheLineIndexBits<8> { - static int constexpr value = 3; -}; -template<> -struct GetCacheLineIndexBits<4> { - static int constexpr value = 2; -}; -template<> -struct GetCacheLineIndexBits<2> { - static int constexpr value = 1; -}; +template struct GetCacheLineIndexBits { static int constexpr value = 0; }; +template<> struct GetCacheLineIndexBits<64> { static int constexpr value = 6; }; +template<> struct GetCacheLineIndexBits<32> { static int constexpr value = 5; }; +template<> struct GetCacheLineIndexBits<16> { static int constexpr value = 4; }; +template<> struct GetCacheLineIndexBits< 8> { static int constexpr value = 3; }; +template<> struct GetCacheLineIndexBits< 4> { static int constexpr value = 2; }; +template<> struct GetCacheLineIndexBits< 2> { static int constexpr value = 1; }; template struct GetIndexShuffleBits { @@ -321,7 +300,7 @@ public: static_cast(*this).do_push(std::forward(element), head); } - Derived& pop() noexcept { + Derived pop() noexcept { unsigned tail; if(Derived::spsc_) { tail = tail_.load(X); @@ -342,7 +321,7 @@ public: return static_cast(head_.load(X) - tail_.load(X)) >= static_cast(static_cast(*this).size_); } - unsigned size() const noexcept { + unsigned capacity() const noexcept { return static_cast(*this).size_; } }; @@ -491,7 +470,7 @@ public: void swap(AtomicQueueB& b) noexcept { using std::swap; - swap(static_cast(*this), static_cast(b)); + this->Base::swap(b); swap(static_cast(*this), static_cast(b)); swap(size_, b.size_); swap(elements_, b.elements_); @@ -532,13 +511,13 @@ class AtomicQueueB2 : public AtomicQueueCommon(tail % (size_ - 1)); + unsigned index = details::remap_index(tail & (size_ - 1)); return Base::template do_pop_any(states_[index], elements_[index]); } template void do_push(U&& element, unsigned head) noexcept { - unsigned index = details::remap_index(head % (size_ - 1)); + unsigned index = details::remap_index(head & (size_ - 1)); Base::template do_push_any(std::forward(element), states_[index], elements_[index]); } @@ -588,7 +567,7 @@ public: void swap(AtomicQueueB2& b) noexcept { using std::swap; - swap(static_cast(*this), static_cast(b)); + this->Base::swap(b); swap(static_cast(*this), static_cast(b)); swap(static_cast(*this), static_cast(b)); swap(size_, b.size_); diff --git a/src/external/atomic_queue/defs.h b/src/external/atomic_queue/defs.h index 49d7d615..c73b4539 100644 --- a/src/external/atomic_queue/defs.h +++ b/src/external/atomic_queue/defs.h @@ -45,7 +45,7 @@ static inline void spin_loop_pause() noexcept { namespace atomic_queue { -#if defined(__GNUC__) +#if defined(__GNUC__) || defined(__clang__) #define ATOMIC_QUEUE_LIKELY(expr) __builtin_expect(static_cast(expr), 1) #define ATOMIC_QUEUE_UNLIKELY(expr) __builtin_expect(static_cast(expr), 0) #else diff --git a/src/external/ghc/filesystem.hpp b/src/external/ghc/filesystem.hpp index 899eefde..56b2f718 100644 --- a/src/external/ghc/filesystem.hpp +++ b/src/external/ghc/filesystem.hpp @@ -5,32 +5,24 @@ //--------------------------------------------------------------------------------------- // // Copyright (c) 2018, Steffen Schümann -// All rights reserved. // -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: // -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. // -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its contributors -// may be used to endorse or promote products derived from this software without -// specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. // //--------------------------------------------------------------------------------------- // @@ -177,7 +169,7 @@ //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // ghc::filesystem version in decimal (major * 10000 + minor * 100 + patch) -#define GHC_FILESYSTEM_VERSION 10211L +#define GHC_FILESYSTEM_VERSION 10300L namespace ghc { namespace filesystem { diff --git a/src/sfizz/FilePool.cpp b/src/sfizz/FilePool.cpp index cf80f33b..d5471a12 100644 --- a/src/sfizz/FilePool.cpp +++ b/src/sfizz/FilePool.cpp @@ -245,7 +245,7 @@ sfz::FilePromisePtr sfz::FilePool::getFilePromise(const std::string& filename) n promise->creationTime = std::chrono::high_resolution_clock::now(); if (!promiseQueue.try_push(promise)) { - DBG("[sfizz] Could not enqueue the promise for " << filename << " (queue size " << promiseQueue.size() << ")"); + DBG("[sfizz] Could not enqueue the promise for " << filename << " (queue capacity " << promiseQueue.capacity() << ")"); return {}; }