From e8b5be519c050e96cfd3c8d9da93d9cc2d6f88b5 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Tue, 4 Aug 2020 20:40:18 +0800 Subject: [PATCH] Make Modes.exit an atomic_int to make cross-thread use a little simpler. --- dump1090.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dump1090.h b/dump1090.h index 96d1b1b..f45bb34 100644 --- a/dump1090.h +++ b/dump1090.h @@ -65,6 +65,7 @@ #include #include #include +#include #include #include #include @@ -306,7 +307,7 @@ struct _Modes { // Internal state double sample_rate; // actual sample rate in use (in hz) uint16_t *log10lut; // Magnitude -> log10 lookup table - int exit; // Exit from the main loop when true (2 = unclean exit) + atomic_int exit; // Exit from the main loop when true (2 = unclean exit) // Sample conversion int dc_filter; // should we apply a DC filter?