File: 0039-buffer_single_mapped-locking-needs-a-named-object.patch

package info (click to toggle)
gnuradio 3.10.12.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 41,196 kB
  • sloc: cpp: 191,540; python: 91,856; ansic: 2,292; xml: 999; fortran: 927; sh: 477; makefile: 50
file content (38 lines) | stat: -rw-r--r-- 1,545 bytes parent folder | download
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
From 2ebb2c63d6a5901dd829451fbf250bbff3475965 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20M=C3=BCller?= <mmueller@gnuradio.org>
Date: Sun, 8 Jun 2025 15:46:20 +0200
Subject: [PATCH 39/41] buffer_single_mapped: locking needs a named object
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
---
 gnuradio-runtime/lib/buffer_single_mapped.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnuradio-runtime/lib/buffer_single_mapped.cc b/gnuradio-runtime/lib/buffer_single_mapped.cc
index 1095ac9991..2879a66f9b 100644
--- a/gnuradio-runtime/lib/buffer_single_mapped.cc
+++ b/gnuradio-runtime/lib/buffer_single_mapped.cc
@@ -126,7 +126,7 @@ bool buffer_single_mapped::allocate_buffer(int nitems)
 bool buffer_single_mapped::input_blkd_cb_ready(int items_required,
                                                unsigned int read_index)
 {
-    gr::thread::scoped_lock(*this->mutex());
+    gr::thread::scoped_lock lock(*this->mutex());
 
     return (((d_bufsize - read_index) < (uint32_t)items_required) &&
             (d_write_index < read_index));
@@ -136,7 +136,7 @@ bool buffer_single_mapped::output_blkd_cb_ready(int output_multiple)
 {
     uint32_t space_avail = 0;
     {
-        gr::thread::scoped_lock(*this->mutex());
+        gr::thread::scoped_lock lock(*this->mutex());
         space_avail = space_available();
     }
     return (((space_avail > 0) || (space_avail == 0 && d_has_history)) &&
-- 
2.47.3