diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-12-11 16:41:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-11 16:41:52 +0100 |
commit | f61fca40af11c9d35e26008fb49afbf99624b4f7 (patch) | |
tree | 4bd53f26a61e6f9fcf3450a2b080dc6a310f2e82 /vespalib | |
parent | c3b1c3f4f8e5dc4b10c013a6af03716c4fa18fea (diff) | |
parent | 75e3be9a94815c4ce4506e2af8568d3abf5f9d5f (diff) |
Merge pull request #20467 from vespa-engine/toregge/backport-to-gcc-9-use-normal-function-template
Use normal function template instead of abbreviated function template.
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/tests/wakeup/wakeup_bench.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/vespalib/src/tests/wakeup/wakeup_bench.cpp b/vespalib/src/tests/wakeup/wakeup_bench.cpp index 3661a7c9389..1d9817508d3 100644 --- a/vespalib/src/tests/wakeup/wakeup_bench.cpp +++ b/vespalib/src/tests/wakeup/wakeup_bench.cpp @@ -184,8 +184,10 @@ template <typename T> auto create_list() { return list; } -void destroy_list(auto &list) __attribute__((noinline)); -void destroy_list(auto &list) { +template <typename T> +void destroy_list(T &list) __attribute__((noinline)); +template <typename T> +void destroy_list(T &list) { for (auto *item: list) { item->stop(); item->thread.join(); @@ -193,8 +195,10 @@ void destroy_list(auto &list) { } } -void wait_until_ready(const auto &list) __attribute__((noinline)); -void wait_until_ready(const auto &list) { +template <typename T> +void wait_until_ready(const T &list) __attribute__((noinline)); +template <typename T> +void wait_until_ready(const T &list) { size_t num_ready = 0; do { num_ready = 0; @@ -206,8 +210,10 @@ void wait_until_ready(const auto &list) { } while (num_ready < N); } -auto perform_wakeups(auto &list, size_t target) __attribute__((noinline)); -auto perform_wakeups(auto &list, size_t target) { +template <typename T> +auto perform_wakeups(T &list, size_t target) __attribute__((noinline)); +template <typename T> +auto perform_wakeups(T &list, size_t target) { size_t wake_cnt = 0; size_t skip_cnt = 0; while (wake_cnt < target) { |