summaryrefslogtreecommitdiffstats
path: root/src/main.h
diff options
context:
space:
mode:
authorFederico Ceratto <federico.ceratto@gmail.com>2018-03-27 21:28:21 +0000
committerFederico Ceratto <federico.ceratto@gmail.com>2018-03-27 21:28:21 +0000
commitd4dd00f58a502c9ca4b63e36ce6bc7a9945dc63c (patch)
treefaac99f51f182bb8c0a03e95e393d421ac9ddf42 /src/main.h
parentNew upstream version 1.9.0+dfsg (diff)
downloadnetdata-d4dd00f58a502c9ca4b63e36ce6bc7a9945dc63c.tar.xz
netdata-d4dd00f58a502c9ca4b63e36ce6bc7a9945dc63c.zip
New upstream version 1.10.0+dfsgupstream/1.10.0+dfsg
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main.h b/src/main.h
index 09567bc7c..d29bf74e7 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1,6 +1,10 @@
#ifndef NETDATA_MAIN_H
#define NETDATA_MAIN_H 1
+#define NETDATA_MAIN_THREAD_RUNNING CONFIG_BOOLEAN_YES
+#define NETDATA_MAIN_THREAD_EXITING (CONFIG_BOOLEAN_YES + 1)
+#define NETDATA_MAIN_THREAD_EXITED CONFIG_BOOLEAN_NO
+
/**
* This struct contains information about command line options.
*/
@@ -22,15 +26,15 @@ struct netdata_static_thread {
char *config_section;
char *config_name;
- volatile int enabled;
+ volatile sig_atomic_t enabled;
- pthread_t *thread;
+ netdata_thread_t *thread;
void (*init_routine) (void);
void *(*start_routine) (void *);
};
-extern void kill_childs(void);
+extern void cancel_main_threads(void);
extern int killpid(pid_t pid, int signal);
extern void netdata_cleanup_and_exit(int ret) NORETURN;