Package: uhd / 3.9.5-2

0018-stream-Document-thread-non-safety-of-recv.patch Patch series | 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
From b1a625d49796eca300caadbbfaf2e1f86a367c72 Mon Sep 17 00:00:00 2001
From: Martin Braun <martin.braun@ettus.com>
Date: Fri, 23 Sep 2016 18:10:16 -0700
Subject: [PATCH 18/30] stream: Document thread-non-safety of recv()

---
 host/include/uhd/stream.hpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/host/include/uhd/stream.hpp b/host/include/uhd/stream.hpp
index e8f9b7b..0dfc94c 100644
--- a/host/include/uhd/stream.hpp
+++ b/host/include/uhd/stream.hpp
@@ -217,6 +217,10 @@ public:
      * the call will return after a single packet has been processed.
      * This may be useful to maintain packet boundaries in some cases.
      *
+     * Note on threading: recv() is *not* thread-safe, to avoid locking
+     * overhead. The application calling recv() is responsible for making
+     * sure that not more than one thread can call recv() at the same time.
+     *
      * \param buffs a vector of writable memory to fill with samples
      * \param nsamps_per_buff the size of each buffer in number of samples
      * \param metadata data to fill describing the buffer
-- 
2.1.4