File: fix_unused_variable.patch

package info (click to toggle)
libatomic-queue 0.0%2Bgit20201108.d9d66b6-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 34,152 kB
  • sloc: cpp: 1,601; javascript: 350; makefile: 137; python: 122; sh: 61; ansic: 52
file content (42 lines) | stat: -rw-r--r-- 1,734 bytes parent folder | download | duplicates (2)
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: Fri, 23 Oct 2020 22:10:01 +0200
Description: Fix unused variable

--- a/src/benchmarks.cc
+++ b/src/benchmarks.cc
@@ -197,7 +197,7 @@ void throughput_producer(unsigned N, Que
     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);
@@ -208,7 +208,7 @@ void throughput_consumer_impl(unsigned N
     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);
@@ -408,7 +408,7 @@ void run_throughput_benchmarks(HugePages
 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) {
@@ -422,7 +422,7 @@ void ping_pong_thread_impl(Queue* q1, Qu
 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) {