summaryrefslogtreecommitdiffstats
path: root/src/libnetdata/os/gettid.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-09 08:36:07 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 11:21:20 +0000
commiteae52fdaa9298e00f14b0b6256400d200db9c373 (patch)
treea3040a19bd024295ded05370853647bab9d7c225 /src/libnetdata/os/gettid.c
parentAdding upstream version 1.47.5. (diff)
downloadnetdata-upstream/2.0.3.tar.xz
netdata-upstream/2.0.3.zip
Adding upstream version 2.0.3.upstream/2.0.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/libnetdata/os/gettid.c')
-rw-r--r--src/libnetdata/os/gettid.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libnetdata/os/gettid.c b/src/libnetdata/os/gettid.c
index 273c428f8..d61819445 100644
--- a/src/libnetdata/os/gettid.c
+++ b/src/libnetdata/os/gettid.c
@@ -2,10 +2,6 @@
#include "../libnetdata.h"
-#if defined(OS_WINDOWS)
-#include <windows.h>
-#endif
-
pid_t os_gettid(void) {
#if defined(HAVE_GETTID)
return gettid();
@@ -30,4 +26,9 @@ pid_t gettid_cached(void) {
gettid_cached_tid = os_gettid();
return gettid_cached_tid;
-} \ No newline at end of file
+}
+
+pid_t gettid_uncached(void) {
+ gettid_cached_tid = 0;
+ return gettid_cached();
+}