More Spin locks experiments

This commit is contained in:
vsonnier
2019-03-05 06:44:58 +01:00
parent fd30710d14
commit 1d2e35cbac
4 changed files with 21 additions and 19 deletions
+3 -3
View File
@@ -88,7 +88,7 @@ void WaterfallCanvas::attachSpectrumCanvas(SpectrumCanvas *canvas_in) {
}
void WaterfallCanvas::processInputQueue() {
std::lock_guard < SpinMutex > lock(tex_update);
std::lock_guard < std::mutex > lock(tex_update);
gTimer.update();
@@ -127,7 +127,7 @@ void WaterfallCanvas::processInputQueue() {
}
void WaterfallCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
std::lock_guard < SpinMutex > lock(tex_update);
std::lock_guard < std::mutex > lock(tex_update);
wxPaintDC dc(this);
const wxSize ClientSize = GetClientSize();
@@ -913,7 +913,7 @@ void WaterfallCanvas::updateCenterFrequency(long long freq) {
}
void WaterfallCanvas::setLinesPerSecond(int lps) {
std::lock_guard < SpinMutex > lock(tex_update);
std::lock_guard < std::mutex > lock(tex_update);
linesPerSecond = lps;
+1 -2
View File
@@ -14,7 +14,6 @@
#include "SpectrumCanvas.h"
#include "WaterfallPanel.h"
#include "Timer.h"
#include "SpinMutex.h"
class WaterfallCanvas: public InteractiveCanvas {
public:
@@ -94,7 +93,7 @@ private:
Timer gTimer;
double lpsIndex;
bool preBuf;
SpinMutex tex_update;
std::mutex tex_update;
int minBandwidth;
std::atomic_bool fft_size_changed;
// event table