]> sigrok.org Git - pulseview.git/blobdiff - pv/session.hpp
Reduce include bloat by including boost/thread/{locks,shared_mutex}.hpp directly
[pulseview.git] / pv / session.hpp
index f0b4c1624b88d29a249c011e38e8f063651f2744..689b3f832dcf40752f789fb9f3bc59db2e64bc98 100644 (file)
@@ -35,7 +35,7 @@
 #define NOGDI
 #define NORESOURCE
 #endif
-#include <boost/thread.hpp>
+#include <boost/thread/shared_mutex.hpp>
 
 #include <QObject>
 #include <QString>
@@ -136,8 +136,6 @@ private:
        std::shared_ptr<view::Signal> signal_from_channel(
                std::shared_ptr<sigrok::Channel> channel) const;
 
-       void read_sample_rate(std::shared_ptr<sigrok::Device> device);
-
 private:
        void sample_thread_proc(std::shared_ptr<devices::Device> device,
                std::function<void (const QString)> error_handler);
@@ -167,7 +165,7 @@ private:
        mutable boost::shared_mutex signals_mutex_;
        std::unordered_set< std::shared_ptr<view::Signal> > signals_;
 
-       mutable std::mutex data_mutex_;
+       mutable std::recursive_mutex data_mutex_;
        std::shared_ptr<data::Logic> logic_data_;
        uint64_t cur_samplerate_;
        std::shared_ptr<data::LogicSegment> cur_logic_segment_;
@@ -176,6 +174,8 @@ private:
 
        std::thread sampling_thread_;
 
+       bool out_of_memory_;
+
 Q_SIGNALS:
        void capture_state_changed(int state);
        void device_selected();