Commit c190cc30 authored by Sean McAllister's avatar Sean McAllister Committed by Commit Bot

Refactor OS_LINUX preprocessor directive for LaCrOS effort.

Currently, ChromeOS defines the OS_LINUX directive as well as
OS_CHROMEOS.  We're working to separate these two, so we're
making the fact that OS_LINUX == OS_LINUX || OS_CHROMEOS
explicit.

This is changes for /base/allocator/partition_allocator

This CL was uploaded by git cl split.

R=lizeb@chromium.org

Bug: 1110266
Change-Id: Ibf15087393996835bdcedabeacec04114d96c6be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2371209Reviewed-by: default avatarBenoit L <lizeb@chromium.org>
Commit-Queue: Sean McAllister <smcallis@google.com>
Cr-Commit-Position: refs/heads/master@{#801411}
parent 4bb193b4
......@@ -24,7 +24,7 @@
#if defined(OS_ANDROID)
#include <sys/prctl.h>
#endif
#if defined(OS_LINUX)
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
#include <sys/resource.h>
#include <algorithm>
......
......@@ -330,7 +330,7 @@ void FreeFullPage(PartitionRoot<base::internal::ThreadSafe>* root,
}
}
#if defined(OS_LINUX)
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
bool CheckPageInCore(void* ptr, bool in_core) {
unsigned char ret = 0;
EXPECT_EQ(0, mincore(ptr, kSystemPageSize, &ret));
......@@ -341,7 +341,7 @@ bool CheckPageInCore(void* ptr, bool in_core) {
EXPECT_TRUE(CheckPageInCore(ptr, in_core))
#else
#define CHECK_PAGE_IN_CORE(ptr, in_core) (void)(0)
#endif // defined(OS_LINUX)
#endif // defined(OS_LINUX) || defined(OS_CHROMEOS)
class MockPartitionStatsDumper : public PartitionStatsDumper {
public:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment