]> sigrok.org Git - libsigrok.git/blobdiff - libsigrok.h
session: Make sr_session_stop thread-safe
[libsigrok.git] / libsigrok.h
index fba6c9ccf2910c2c86f342480dcf4ec1aba2907b..4212c59c4f046d77522b81a12b9a949568664123 100644 (file)
@@ -775,6 +775,14 @@ struct sr_session {
        struct source *sources;
        GPollFD *pollfds;
        int source_timeout;
+
+       /*
+        * These are our synchronization primitives for stopping the session in
+        * an async fashion. We need to make sure the session is stopped from
+        * within the session thread itself.
+        */
+       GMutex stop_mutex;
+       gboolean abort_session;
 };
 
 #include "proto.h"