summaryrefslogtreecommitdiffstats
path: root/tools/profiler/tasktracer/GeckoTaskTracer.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-10-30 18:42:38 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-10-30 18:42:38 +0100
commitd0da27ef572152d1fdd82a9ac15bd5c23ad68160 (patch)
treea617d33237e64a1f95a09e40c06a962b586583a1 /tools/profiler/tasktracer/GeckoTaskTracer.cpp
parent0f7f961e8894c8408b7fa21bbeba7ac503d372eb (diff)
parent50ef259a2df60d020ccb02d76dc5aa4835ee319e (diff)
downloadUXP-d0da27ef572152d1fdd82a9ac15bd5c23ad68160.tar
UXP-d0da27ef572152d1fdd82a9ac15bd5c23ad68160.tar.gz
UXP-d0da27ef572152d1fdd82a9ac15bd5c23ad68160.tar.lz
UXP-d0da27ef572152d1fdd82a9ac15bd5c23ad68160.tar.xz
UXP-d0da27ef572152d1fdd82a9ac15bd5c23ad68160.zip
Merge branch 'release' into Basilisk-releasev2019.10.31
Diffstat (limited to 'tools/profiler/tasktracer/GeckoTaskTracer.cpp')
-rw-r--r--tools/profiler/tasktracer/GeckoTaskTracer.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/tools/profiler/tasktracer/GeckoTaskTracer.cpp b/tools/profiler/tasktracer/GeckoTaskTracer.cpp
index ada695614..36d1bffc3 100644
--- a/tools/profiler/tasktracer/GeckoTaskTracer.cpp
+++ b/tools/profiler/tasktracer/GeckoTaskTracer.cpp
@@ -20,22 +20,16 @@
#include <stdarg.h>
-// We need a definition of gettid(), but glibc doesn't provide a
+// We need a definition of gettid(), but older glibc versions don't provide a
// wrapper for it.
#if defined(__GLIBC__)
#include <unistd.h>
#include <sys/syscall.h>
-static inline pid_t gettid()
-{
- return (pid_t) syscall(SYS_gettid);
-}
+#define gettid() static_cast<pid_t>(syscall(SYS_gettid))
#elif defined(XP_MACOSX)
#include <unistd.h>
#include <sys/syscall.h>
-static inline pid_t gettid()
-{
- return (pid_t) syscall(SYS_thread_selfid);
-}
+#define gettid() static_cast<pid_t>(syscall(SYS_thread_selfid))
#elif defined(LINUX)
#include <sys/types.h>
pid_t gettid();