about summary refs log tree commit diff
path: root/absl/base/internal/sysinfo.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/base/internal/sysinfo.cc')
-rw-r--r--absl/base/internal/sysinfo.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/absl/base/internal/sysinfo.cc b/absl/base/internal/sysinfo.cc
index dca7d8fdc020..db41bacc844c 100644
--- a/absl/base/internal/sysinfo.cc
+++ b/absl/base/internal/sysinfo.cc
@@ -35,6 +35,10 @@
 #include <sys/sysctl.h>
 #endif
 
+#if defined(__myriad2__)
+#include <rtems.h>
+#endif
+
 #include <string.h>
 #include <cassert>
 #include <cstdint>
@@ -310,6 +314,14 @@ pid_t GetTID() {
   return reinterpret_cast<struct pthread_tcb *>(current_uthread)->id;
 }
 
+#elif defined(__myriad2__)
+
+pid_t GetTID() {
+  uint32_t tid;
+  rtems_task_ident(RTEMS_SELF, 0, &tid);
+  return tid;
+}
+
 #else
 
 // Fallback implementation of GetTID using pthread_getspecific.