aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-third__party_perfetto_include_perfetto_base_thread__utils.h
blob: 46479566aea180c089135605248814eab3f7007e (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-11-13 06:42:20 UTC
+++ third_party/perfetto/include/perfetto/base/thread_utils.h
@@ -35,6 +35,9 @@
 #else
 #include <pthread.h>
 #endif
+#if PERFETTO_BUILDFLAG(PERFETTO_OS_FREEBSD)
+#include <pthread_np.h>
+#endif
 
 namespace perfetto {
 namespace base {
@@ -43,6 +46,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;