read_barrier.h revision 624468cd401cc1ac0dd70c746301e0788a597759
19d04a20bde1b1855cefc64aebc1a44e253b1a13bHiroshi Yamauchi/* 29d04a20bde1b1855cefc64aebc1a44e253b1a13bHiroshi Yamauchi * Copyright (C) 2014 The Android Open Source Project 39d04a20bde1b1855cefc64aebc1a44e253b1a13bHiroshi Yamauchi * 49d04a20bde1b1855cefc64aebc1a44e253b1a13bHiroshi Yamauchi * Licensed under the Apache License, Version 2.0 (the "License"); 59d04a20bde1b1855cefc64aebc1a44e253b1a13bHiroshi Yamauchi * you may not use this file except in compliance with the License. 69d04a20bde1b1855cefc64aebc1a44e253b1a13bHiroshi Yamauchi * You may obtain a copy of the License at 79d04a20bde1b1855cefc64aebc1a44e253b1a13bHiroshi Yamauchi * 89d04a20bde1b1855cefc64aebc1a44e253b1a13bHiroshi Yamauchi * http://www.apache.org/licenses/LICENSE-2.0 99d04a20bde1b1855cefc64aebc1a44e253b1a13bHiroshi Yamauchi * 109d04a20bde1b1855cefc64aebc1a44e253b1a13bHiroshi Yamauchi * Unless required by applicable law or agreed to in writing, software 119d04a20bde1b1855cefc64aebc1a44e253b1a13bHiroshi Yamauchi * distributed under the License is distributed on an "AS IS" BASIS, 129d04a20bde1b1855cefc64aebc1a44e253b1a13bHiroshi Yamauchi * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 139d04a20bde1b1855cefc64aebc1a44e253b1a13bHiroshi Yamauchi * See the License for the specific language governing permissions and 149d04a20bde1b1855cefc64aebc1a44e253b1a13bHiroshi Yamauchi * limitations under the License. 159d04a20bde1b1855cefc64aebc1a44e253b1a13bHiroshi Yamauchi */ 169d04a20bde1b1855cefc64aebc1a44e253b1a13bHiroshi Yamauchi 17624468cd401cc1ac0dd70c746301e0788a597759Hiroshi Yamauchi#ifndef ART_RUNTIME_READ_BARRIER_H_ 18624468cd401cc1ac0dd70c746301e0788a597759Hiroshi Yamauchi#define ART_RUNTIME_READ_BARRIER_H_ 199d04a20bde1b1855cefc64aebc1a44e253b1a13bHiroshi Yamauchi 209d04a20bde1b1855cefc64aebc1a44e253b1a13bHiroshi Yamauchi// This is in a separate file (from globals.h) because asm_support.h 219d04a20bde1b1855cefc64aebc1a44e253b1a13bHiroshi Yamauchi// (a C header, not C++) can't include globals.h. 229d04a20bde1b1855cefc64aebc1a44e253b1a13bHiroshi Yamauchi 23624468cd401cc1ac0dd70c746301e0788a597759Hiroshi Yamauchi// Uncomment one of the following two and the two fields in 24624468cd401cc1ac0dd70c746301e0788a597759Hiroshi Yamauchi// Object.java (libcore) to enable baker or brooks pointers. 259d04a20bde1b1855cefc64aebc1a44e253b1a13bHiroshi Yamauchi 26624468cd401cc1ac0dd70c746301e0788a597759Hiroshi Yamauchi// #define USE_BAKER_READ_BARRIER 27624468cd401cc1ac0dd70c746301e0788a597759Hiroshi Yamauchi// #define USE_BROOKS_READ_BARRIER 28624468cd401cc1ac0dd70c746301e0788a597759Hiroshi Yamauchi 29624468cd401cc1ac0dd70c746301e0788a597759Hiroshi Yamauchi#if defined(USE_BAKER_READ_BARRIER) || defined(USE_BROOKS_READ_BARRIER) 30624468cd401cc1ac0dd70c746301e0788a597759Hiroshi Yamauchi#define USE_BAKER_OR_BROOKS_READ_BARRIER 31624468cd401cc1ac0dd70c746301e0788a597759Hiroshi Yamauchi#endif 32624468cd401cc1ac0dd70c746301e0788a597759Hiroshi Yamauchi 33624468cd401cc1ac0dd70c746301e0788a597759Hiroshi Yamauchi#if defined(USE_BAKER_READ_BARRIER) && defined(USE_BROOKS_READ_BARRIER) 34624468cd401cc1ac0dd70c746301e0788a597759Hiroshi Yamauchi#error "Only one of Baker or Brooks can be enabled at a time." 35624468cd401cc1ac0dd70c746301e0788a597759Hiroshi Yamauchi#endif 36624468cd401cc1ac0dd70c746301e0788a597759Hiroshi Yamauchi 37624468cd401cc1ac0dd70c746301e0788a597759Hiroshi Yamauchi#endif // ART_RUNTIME_READ_BARRIER_H_ 38