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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
From 6d950d15ba5192a86c57d8045d1d26f9ad4be0db Mon Sep 17 00:00:00 2001
From: Robin Gareus <robin@gareus.org>
Date: Thu, 16 Jul 2020 16:13:21 +0200
Subject: [PATCH] Use signed int for atomic operations -- #8314
---
libs/pbd/pbd/mpmc_queue.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libs/pbd/pbd/mpmc_queue.h b/libs/pbd/pbd/mpmc_queue.h
index a7909a901..2c08068e1 100644
--- a/libs/pbd/pbd/mpmc_queue.h
+++ b/libs/pbd/pbd/mpmc_queue.h
@@ -82,7 +82,7 @@ public:
push_back (T const& data)
{
cell_t* cell;
- guint pos = g_atomic_int_get (&_enqueue_pos);
+ gint pos = g_atomic_int_get (&_enqueue_pos);
for (;;) {
cell = &_buffer[pos & _buffer_mask];
guint seq = g_atomic_int_get (&cell->_sequence);
@@ -108,7 +108,7 @@ public:
pop_front (T& data)
{
cell_t* cell;
- guint pos = g_atomic_int_get (&_dequeue_pos);
+ gint pos = g_atomic_int_get (&_dequeue_pos);
for (;;) {
cell = &_buffer[pos & _buffer_mask];
guint seq = g_atomic_int_get (&cell->_sequence);
@@ -138,8 +138,8 @@ private:
cell_t* _buffer;
size_t _buffer_mask;
- volatile guint _enqueue_pos;
- volatile guint _dequeue_pos;
+ volatile gint _enqueue_pos;
+ volatile gint _dequeue_pos;
};
} /* end namespace */
--
2.28.0
From 9fcb51de2e34f9fee74838e57317ad44d21c40d0 Mon Sep 17 00:00:00 2001
From: Robin Gareus <robin@gareus.org>
Date: Thu, 16 Jul 2020 18:07:14 +0200
Subject: [PATCH] Use signed int for atomic operations part II -- #8314
---
libs/ardour/ardour/session.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index dcc8c88ed..f491f7f17 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -1762,7 +1762,7 @@ private:
OnlyLoop,
};
- volatile guint _punch_or_loop; // enum PunchLoopLock
+ volatile gint _punch_or_loop; // enum PunchLoopLock
gint current_usecs_per_track;
bool punch_active () const;
--
2.28.0
|