blob: ba0d8304288625198373e5cb84b7a6ed43700677 [file] [log] [blame]
Hiroshi Yamauchi624468c2014-03-31 15:14:47 -07001/*
2 * Copyright (C) 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ART_RUNTIME_READ_BARRIER_H_
18#define ART_RUNTIME_READ_BARRIER_H_
19
20// This is in a separate file (from globals.h) because asm_support.h
21// (a C header, not C++) can't include globals.h.
22
23// Uncomment one of the following two and the two fields in
24// Object.java (libcore) to enable baker or brooks pointers.
25
26// #define USE_BAKER_READ_BARRIER
27// #define USE_BROOKS_READ_BARRIER
28
29#if defined(USE_BAKER_READ_BARRIER) || defined(USE_BROOKS_READ_BARRIER)
30#define USE_BAKER_OR_BROOKS_READ_BARRIER
31#endif
32
33#if defined(USE_BAKER_READ_BARRIER) && defined(USE_BROOKS_READ_BARRIER)
34#error "Only one of Baker or Brooks can be enabled at a time."
35#endif
36
37#endif // ART_RUNTIME_READ_BARRIER_H_