aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-third__party_perfetto_include_perfetto_base_thread__utils.h
blob: c8947d13ecbf478c4ded1c37546786978e748347 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- third_party/perfetto/include/perfetto/base/thread_utils.h.orig	2020-03-16 18:42:11 UTC
+++ third_party/perfetto/include/perfetto/base/thread_utils.h
@@ -33,6 +33,9 @@
 #include <sys/types.h>
 #include <unistd.h>
 #endif
+#if PERFETTO_BUILDFLAG(PERFETTO_OS_FREEBSD)
+#include <pthread_np.h>
+#endif
 
 namespace perfetto {
 namespace base {
@@ -41,6 +44,11 @@ namespace base {
 using PlatformThreadId = pid_t;
 inline PlatformThreadId GetThreadId() {
   return gettid();
+}
+#elif PERFETTO_BUILDFLAG(PERFETTO_OS_FREEBSD)
+using PlatformThreadId = pid_t;
+inline PlatformThreadId GetThreadId() {
+  return pthread_getthreadid_np();
 }
 #elif PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX)
 using PlatformThreadId = pid_t;