1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
Author: Andreas Tille <tille@debian.org>
Last-Update: 2020-10-23
Description: Fix unused variable
--- libatomic-queue.orig/src/benchmarks.cc
+++ libatomic-queue/src/benchmarks.cc
@@ -180,7 +180,7 @@
cycles_t expected = 0;
t0->compare_exchange_strong(expected, __builtin_ia32_rdtsc(), std::memory_order_acq_rel, std::memory_order_relaxed);
- region_guard_t<Queue> guard;
+ //region_guard_t<Queue> guard;
ProducerOf<Queue> producer{*queue};
for(unsigned n = 1, stop = N + 1; n <= stop; ++n)
producer.push(*queue, n);
@@ -191,7 +191,7 @@
unsigned const stop = N + 1;
sum_t sum = 0;
- region_guard_t<Queue> guard;
+ //region_guard_t<Queue> guard;
ConsumerOf<Queue> consumer{*queue};
for(;;) {
unsigned n = consumer.pop(*queue);
@@ -393,7 +393,7 @@
template<class Queue>
void ping_pong_thread_impl(Queue* q1, Queue* q2, unsigned N, cycles_t* time, std::false_type /*sender*/) {
cycles_t t0 = __builtin_ia32_rdtsc();
- region_guard_t<Queue> guard;
+ //region_guard_t<Queue> guard;
ConsumerOf<Queue> consumer_q1{*q1};
ProducerOf<Queue> producer_q2{*q2};
for(unsigned i = 1, j = 0; j < N; ++i) {
@@ -407,7 +407,7 @@
template<class Queue>
void ping_pong_thread_impl(Queue* q1, Queue* q2, unsigned N, cycles_t* time, std::true_type /*sender*/) {
cycles_t t0 = __builtin_ia32_rdtsc();
- region_guard_t<Queue> guard;
+ //region_guard_t<Queue> guard;
ProducerOf<Queue> producer_q1{*q1};
ConsumerOf<Queue> consumer_q2{*q2};
for(unsigned i = 1, j = 0; j < N; ++i) {
|