summaryrefslogtreecommitdiffstats
path: root/src/trex_watchdog.h
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-06-02 13:40:02 +0300
committerimarom <imarom@cisco.com>2016-06-02 13:45:13 +0300
commit8feef53b5a272ec7a72f05d1a633d2a18071b775 (patch)
tree2951e349e8c9b3ec5dfd09ed81f8cae2318d4738 /src/trex_watchdog.h
parent3c4a29e15f3663f6413fbee2562d7d0aa4e2f80d (diff)
WATCHDOG - disable monitors when done to avoid crash when joining on
other threads
Diffstat (limited to 'src/trex_watchdog.h')
-rw-r--r--src/trex_watchdog.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/trex_watchdog.h b/src/trex_watchdog.h
index 53a48217..63255180 100644
--- a/src/trex_watchdog.h
+++ b/src/trex_watchdog.h
@@ -75,6 +75,13 @@ public:
/**
+ * disable a monitor - it will no longer be watched
+ *
+ */
+ void disable_monitor(int handle);
+
+
+ /**
* should be called by each thread on it's handle
*
* @author imarom (31-May-16)
@@ -101,6 +108,7 @@ public:
/* should be cache aligned to avoid false sharing */
struct monitor_st {
/* write fields are first */
+ volatile bool active;
volatile bool tickled;
dsec_t ts;
@@ -110,7 +118,7 @@ public:
std::string name;
/* for for a full cacheline */
- uint8_t pad[16];
+ uint8_t pad[15];
};