summaryrefslogtreecommitdiff
path: root/gr-qtgui/src/lib/qtgui.h
diff options
context:
space:
mode:
authorJosh Blum2011-01-23 23:37:18 -0800
committerJosh Blum2011-02-27 19:59:35 -0800
commit069dabd73ff66ad93223bbeec2c157c37eb0a8fc (patch)
tree75d61e578c0a0635fe483012a4444437199fed3d /gr-qtgui/src/lib/qtgui.h
parenta02bb131f68d5aa66093310c393562671e389778 (diff)
downloadgnuradio-069dabd73ff66ad93223bbeec2c157c37eb0a8fc.tar.gz
gnuradio-069dabd73ff66ad93223bbeec2c157c37eb0a8fc.tar.bz2
gnuradio-069dabd73ff66ad93223bbeec2c157c37eb0a8fc.zip
qtgui use gruel thread mutex:
Replace pthread mutex usage with gruel thread mutex to make the code portable on systems without pthreads.
Diffstat (limited to 'gr-qtgui/src/lib/qtgui.h')
-rw-r--r--gr-qtgui/src/lib/qtgui.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/gr-qtgui/src/lib/qtgui.h b/gr-qtgui/src/lib/qtgui.h
index 6edbca12c..9831697ac 100644
--- a/gr-qtgui/src/lib/qtgui.h
+++ b/gr-qtgui/src/lib/qtgui.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2008 Free Software Foundation, Inc.
+ * Copyright 2008,2011 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -23,30 +23,31 @@
#ifndef INCLUDED_QTGUI_H
#define INCLUDED_QTGUI_H
+#include <gruel/thread.h>
#include <qapplication.h>
#include "SpectrumGUIClass.h"
class qtgui_event : public QEvent
{
private:
- pthread_mutex_t *pmutex;
+ gruel::mutex &d_mutex;
public:
- qtgui_event(pthread_mutex_t *mut)
- : QEvent((QEvent::Type)(QEvent::User+101))
+ qtgui_event(gruel::mutex &mutex)
+ : QEvent((QEvent::Type)(QEvent::User+101)),
+ d_mutex(mutex)
{
- pmutex = mut;
+ //nop
}
void lock()
{
- pthread_mutex_lock(pmutex);
-
+ d_mutex.lock();
}
void unlock()
{
- pthread_mutex_unlock(pmutex);
+ d_mutex.unlock();
}
};