about summary refs log tree commit diff
path: root/absl/base/internal
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2018-03-06T20·30-0800
committerShaindel Schwartz <shaindel@google.com>2018-03-06T22·21-0500
commit94f0f79ecd2d9e5271a21bc4ededea9b58c60674 (patch)
tree7e1fd953b35cd6961e0d5717e5f465d1931fd1d4 /absl/base/internal
parent5337d2d0e312ce6bce0140b5f1da5548a0b3fed5 (diff)
Changes imported from Abseil "staging" branch:
  - aba727a5943a014392e3873349cee9dd5efc634e Avoid using 128-bit intrinsics for Clang on Windows. by Abseil Team <absl-team@google.com>
  - cdd19f1eda562af8906bff8feff827eb8e8e9797 Utilize the rtems TID infrastructure on myriad2 platforms. by Abseil Team <absl-team@google.com>
  - 52f7f55daa84ea25fa210d1b9d2bd64d128e1d81 Use intrinsic 128 bit integer when available for division... by Alex Strelnikov <strel@google.com>
  - 51f881b1152c0c861cf7fcac53f30d3c7ce12902 Merge GitHub #95: Fix compiler version check for clang-cl... by Derek Mauro <dmauro@google.com>

GitOrigin-RevId: aba727a5943a014392e3873349cee9dd5efc634e
Change-Id: I9b52d84095537acbbc96d3f74917f78da9a51156
Diffstat (limited to 'absl/base/internal')
-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.