summaryrefslogtreecommitdiff
path: root/absl/base/config.h
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2021-01-12 07:36:20 -0800
committerGravatar Andy Getz <durandal@google.com>2021-01-12 11:57:11 -0500
commit322ae2420d27fc96d0a8ab1167d7de33671048df (patch)
treee00368177de976612408e0d995ff352fac200a0d /absl/base/config.h
parent62ce712ecc887f669610a93efe18abecf70b47a0 (diff)
Export of internal Abseil changes
-- 1609589925459c2c0b2a17912c0d65227f709db9 by Abseil Team <absl-team@google.com>: Clarify the "Potential Mutex deadlock" reason message. PiperOrigin-RevId: 351367862 -- 88bf28863db2c2d2d48767c3e4dfab6a48bdff79 by Abseil Team <absl-team@google.com>: Print CPU number is fault handler. This CL adds code to print CPU number inside the fault handler. This is only supported on Linux. The CPU number is also a hint only. There is no guarantee that it is indeed the CPU on which a fault happened. PiperOrigin-RevId: 351238373 -- 66a9c8e44b5744fec1ca0d7b8db7e1d50772d9a2 by Samuel Benzaquen <sbenza@google.com>: Add better error message for ODR violations of flags. PiperOrigin-RevId: 351197423 -- 6efd1efb341563148dd43255aaa4bf959dfd9554 by Chris Kennelly <ckennelly@google.com>: Assume bitwise builtins are available on GCC. These are long-standing builtins but are not consistently detected by ABSL_HAVE_BUILTIN. PiperOrigin-RevId: 350814036 GitOrigin-RevId: 1609589925459c2c0b2a17912c0d65227f709db9 Change-Id: Ied3fd2f135187f2c316b403fba45f3bbaea54138
Diffstat (limited to 'absl/base/config.h')
-rw-r--r--absl/base/config.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/absl/base/config.h b/absl/base/config.h
index c9a06f1d..f6ddf0c5 100644
--- a/absl/base/config.h
+++ b/absl/base/config.h
@@ -379,6 +379,15 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
#define ABSL_HAVE_PTHREAD_GETSCHEDPARAM 1
#endif
+// ABSL_HAVE_SCHED_GETCPU
+//
+// Checks whether sched_getcpu is available.
+#ifdef ABSL_HAVE_SCHED_GETCPU
+#error ABSL_HAVE_SCHED_GETCPU cannot be directly set
+#elif defined(__linux__)
+#define ABSL_HAVE_SCHED_GETCPU 1
+#endif
+
// ABSL_HAVE_SCHED_YIELD
//
// Checks whether the platform implements sched_yield(2) as defined in