diff options
Diffstat (limited to 'libartbase/base/utils.h')
-rw-r--r-- | libartbase/base/utils.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libartbase/base/utils.h b/libartbase/base/utils.h index 0e8231a92c..90eb2daa4d 100644 --- a/libartbase/base/utils.h +++ b/libartbase/base/utils.h @@ -31,6 +31,10 @@ #include "globals.h" #include "macros.h" +#if defined(__linux__) +#include <sys/utsname.h> +#endif + namespace art { static inline uint32_t PointerToLowMemUInt32(const void* p) { @@ -125,6 +129,10 @@ NO_RETURN void SleepForever(); // Flush CPU caches. Returns true on success, false if flush failed. WARN_UNUSED bool FlushCpuCaches(void* begin, void* end); +#if defined(__linux__) +bool IsKernelVersionAtLeast(int reqd_major, int reqd_minor); +#endif + // On some old kernels, a cache operation may segfault. WARN_UNUSED bool CacheOperationsMaySegFault(); |