summaryrefslogtreecommitdiffstats
path: root/collectors/plugins.d/plugins_d.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-06 16:11:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-06 16:11:30 +0000
commitaa2fe8ccbfcb117efa207d10229eeeac5d0f97c7 (patch)
tree941cbdd387b41c1a81587c20a6df9f0e5e0ff7ab /collectors/plugins.d/plugins_d.h
parentAdding upstream version 1.37.1. (diff)
downloadnetdata-aa2fe8ccbfcb117efa207d10229eeeac5d0f97c7.tar.xz
netdata-aa2fe8ccbfcb117efa207d10229eeeac5d0f97c7.zip
Adding upstream version 1.38.0.upstream/1.38.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/plugins.d/plugins_d.h')
-rw-r--r--collectors/plugins.d/plugins_d.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/collectors/plugins.d/plugins_d.h b/collectors/plugins.d/plugins_d.h
index a8acf038a..35af9fe58 100644
--- a/collectors/plugins.d/plugins_d.h
+++ b/collectors/plugins.d/plugins_d.h
@@ -50,9 +50,6 @@ struct plugind {
char fullfilename[FILENAME_MAX+1]; // with path
char cmd[PLUGINSD_CMD_MAX+1]; // the command that it executes
- volatile pid_t pid;
- netdata_thread_t thread;
-
size_t successful_collections; // the number of times we have seen
// values collected from this plugin
@@ -60,8 +57,14 @@ struct plugind {
// without collecting values
int update_every; // the plugin default data collection frequency
- volatile sig_atomic_t obsolete; // do not touch this structure after setting this to 1
- volatile sig_atomic_t enabled; // if this is enabled or not
+
+ struct {
+ SPINLOCK spinlock;
+ bool running; // do not touch this structure after setting this to 1
+ bool enabled; // if this is enabled or not
+ netdata_thread_t thread;
+ pid_t pid;
+ } unsafe;
time_t started_t;
uint32_t capabilities; // follows the same principles as streaming capabilities