mirror of
https://github.com/abseil/abseil-cpp.git
synced 2026-06-04 20:14:23 +08:00
Add Support for mmap on Qualcomm Hexagon DSP targets.
PiperOrigin-RevId: 548709037 Change-Id: I6eb03553299265660aa0abc180ae0f197a416ba4
This commit is contained in:
committed by
Copybara-Service
parent
593826300a
commit
be85b347a8
@@ -412,7 +412,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
|
||||
defined(__asmjs__) || defined(__wasm__) || defined(__Fuchsia__) || \
|
||||
defined(__sun) || defined(__ASYLO__) || defined(__myriad2__) || \
|
||||
defined(__HAIKU__) || defined(__OpenBSD__) || defined(__NetBSD__) || \
|
||||
defined(__QNX__) || defined(__VXWORKS__)
|
||||
defined(__QNX__) || defined(__VXWORKS__) || defined(__hexagon__)
|
||||
#define ABSL_HAVE_MMAP 1
|
||||
#endif
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
#include "absl/base/internal/spinlock.h"
|
||||
|
||||
// MAP_ANONYMOUS
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) || defined(__hexagon__)
|
||||
// For mmap, Linux defines both MAP_ANONYMOUS and MAP_ANON and says MAP_ANON is
|
||||
// deprecated. In Darwin, MAP_ANON is all there is.
|
||||
#if !defined MAP_ANONYMOUS
|
||||
|
||||
@@ -46,7 +46,8 @@
|
||||
// for more information.
|
||||
#ifdef ABSL_LOW_LEVEL_ALLOC_ASYNC_SIGNAL_SAFE_MISSING
|
||||
#error ABSL_LOW_LEVEL_ALLOC_ASYNC_SIGNAL_SAFE_MISSING cannot be directly set
|
||||
#elif defined(_WIN32) || defined(__asmjs__) || defined(__wasm__)
|
||||
#elif defined(_WIN32) || defined(__asmjs__) || defined(__wasm__) || \
|
||||
defined(__hexagon__)
|
||||
#define ABSL_LOW_LEVEL_ALLOC_ASYNC_SIGNAL_SAFE_MISSING 1
|
||||
#endif
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cinttypes>
|
||||
#include <limits>
|
||||
#include "absl/base/internal/hide_ptr.h"
|
||||
#include "absl/base/internal/raw_logging.h"
|
||||
@@ -386,19 +387,22 @@ bool GraphCycles::CheckInvariants() const {
|
||||
Node* nx = r->nodes_[x];
|
||||
void* ptr = base_internal::UnhidePtr<void>(nx->masked_ptr);
|
||||
if (ptr != nullptr && static_cast<uint32_t>(r->ptrmap_.Find(ptr)) != x) {
|
||||
ABSL_RAW_LOG(FATAL, "Did not find live node in hash table %u %p", x, ptr);
|
||||
ABSL_RAW_LOG(FATAL, "Did not find live node in hash table %" PRIu32 " %p",
|
||||
x, ptr);
|
||||
}
|
||||
if (nx->visited) {
|
||||
ABSL_RAW_LOG(FATAL, "Did not clear visited marker on node %u", x);
|
||||
ABSL_RAW_LOG(FATAL, "Did not clear visited marker on node %" PRIu32, x);
|
||||
}
|
||||
if (!ranks.insert(nx->rank)) {
|
||||
ABSL_RAW_LOG(FATAL, "Duplicate occurrence of rank %d", nx->rank);
|
||||
ABSL_RAW_LOG(FATAL, "Duplicate occurrence of rank %" PRId32, nx->rank);
|
||||
}
|
||||
HASH_FOR_EACH(y, nx->out) {
|
||||
Node* ny = r->nodes_[static_cast<uint32_t>(y)];
|
||||
if (nx->rank >= ny->rank) {
|
||||
ABSL_RAW_LOG(FATAL, "Edge %u->%d has bad rank assignment %d->%d", x, y,
|
||||
nx->rank, ny->rank);
|
||||
ABSL_RAW_LOG(FATAL,
|
||||
"Edge %" PRIu32 " ->%" PRId32
|
||||
" has bad rank assignment %" PRId32 "->%" PRId32,
|
||||
x, y, nx->rank, ny->rank);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user