summaryrefslogtreecommitdiffstats
path: root/libnetdata/threads
diff options
context:
space:
mode:
authorvkalintiris <vasilis@netdata.cloud>2022-10-09 16:38:49 +0300
committerGitHub <noreply@github.com>2022-10-09 16:38:49 +0300
commitccfbdb5c3d253a391cab0561dfc8a524b93d2e7c (patch)
treecf5e43618e40801db736604e5c8d4c4e6c0f9f65 /libnetdata/threads
parent284d5450ec938b667db9985aca6d3cd02b96487f (diff)
Remove extern from function declared in headers. (#13790)
By default functions are declared as extern in C/C++ headers. The goal of this PR is to reduce the wall of text that many headers have and, more importantly, to make the declaration of extern'd variables - of which we have many dispersed in various places - easily and quickly identifiable. Automatically generated with: $ git grep -l '^extern.*(' '**.h' | \ grep -v libjudy | \ grep -v 'sqlite3.h' | \ xargs sed -i -e 's/extern \(.*(.*$\)/\1/' This is a NFC.
Diffstat (limited to 'libnetdata/threads')
-rw-r--r--libnetdata/threads/threads.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/libnetdata/threads/threads.h b/libnetdata/threads/threads.h
index 854503f315..ccc18aff0a 100644
--- a/libnetdata/threads/threads.h
+++ b/libnetdata/threads/threads.h
@@ -5,7 +5,7 @@
#include "../libnetdata.h"
-extern pid_t gettid(void);
+pid_t gettid(void);
typedef enum {
NETDATA_THREAD_OPTION_DEFAULT = 0 << 0,
@@ -21,27 +21,27 @@ typedef enum {
typedef pthread_t netdata_thread_t;
#define NETDATA_THREAD_TAG_MAX 100
-extern const char *netdata_thread_tag(void);
-extern int netdata_thread_tag_exists(void);
+const char *netdata_thread_tag(void);
+int netdata_thread_tag_exists(void);
-extern size_t netdata_threads_init(void);
-extern void netdata_threads_init_after_fork(size_t stacksize);
+size_t netdata_threads_init(void);
+void netdata_threads_init_after_fork(size_t stacksize);
-extern int netdata_thread_create(netdata_thread_t *thread, const char *tag, NETDATA_THREAD_OPTIONS options, void *(*start_routine) (void *), void *arg);
+int netdata_thread_create(netdata_thread_t *thread, const char *tag, NETDATA_THREAD_OPTIONS options, void *(*start_routine) (void *), void *arg);
#ifdef NETDATA_INTERNAL_CHECKS
#define netdata_thread_cancel(thread) netdata_thread_cancel_with_trace(thread, __LINE__, __FILE__, __FUNCTION__)
-extern int netdata_thread_cancel_with_trace(netdata_thread_t thread, int line, const char *file, const char *function);
+int netdata_thread_cancel_with_trace(netdata_thread_t thread, int line, const char *file, const char *function);
#else
-extern int netdata_thread_cancel(netdata_thread_t thread);
+int netdata_thread_cancel(netdata_thread_t thread);
#endif
-extern int netdata_thread_join(netdata_thread_t thread, void **retval);
-extern int netdata_thread_detach(pthread_t thread);
+int netdata_thread_join(netdata_thread_t thread, void **retval);
+int netdata_thread_detach(pthread_t thread);
#define NETDATA_THREAD_NAME_MAX 15
-extern void uv_thread_set_name_np(uv_thread_t ut, const char* name);
-extern void os_thread_get_current_name_np(char threadname[NETDATA_THREAD_NAME_MAX + 1]);
+void uv_thread_set_name_np(uv_thread_t ut, const char* name);
+void os_thread_get_current_name_np(char threadname[NETDATA_THREAD_NAME_MAX + 1]);
#define netdata_thread_self pthread_self
#define netdata_thread_testcancel pthread_testcancel