// This is essentially, but not quite, a copy of system/libartpalette/palette_fake.cc. // THEY SHOULD BE UPDATED AT THE SAME TIME. // TODO(b/265435354): Reconstruct if / why this is necessary.
// Cached thread priority for testing. No thread priorities are ever affected. // Assumes thread priority is adjusted only through this interface, which is incorrect for // production code, but valid for relevant tests. static std::mutex g_tid_priority_map_mutex; static std::map<int32_t, int32_t> g_tid_priority_map;
// Unless explicitly mentioned otherwise, the following methods have been // introduced in version 1 API, corresponding to SDK level 31.
// Introduced in version 5 API, corresponding to SDK level 36.1.
palette_status_t PaletteMapPriority(int32_t managed_priority, /*out*/ int* result) { if (managed_priority < art::palette::kMinManagedThreadPriority ||
managed_priority > art::palette::kMaxManagedThreadPriority) { return PALETTE_STATUS_INVALID_ARGUMENT;
} // Some test code assumes these are monotically decreasing, so we can reconstruct priority // from niceness.
*result = 10 - 2 * managed_priority; return PALETTE_STATUS_OK;
}
palette_status_t PaletteNotifyStartDex2oatCompilation([[maybe_unused]] int source_fd,
[[maybe_unused]] int art_fd,
[[maybe_unused]] int oat_fd,
[[maybe_unused]] int vdex_fd) { return PALETTE_STATUS_OK;
}
palette_status_t PaletteNotifyEndDex2oatCompilation([[maybe_unused]] int source_fd,
[[maybe_unused]] int art_fd,
[[maybe_unused]] int oat_fd,
[[maybe_unused]] int vdex_fd) { return PALETTE_STATUS_OK;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.