1 /* 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_C_H_ 18 #define ART_RUNTIME_READ_BARRIER_C_H_ 19 20 // This is a C (not C++) header file and is in a separate file (from 21 // globals.h) because asm_support.h is a C header file and can't 22 // include globals.h. 23 24 // Uncomment one of the following two and the two fields in 25 // Object.java (libcore) to enable baker or brooks pointers. 26 27 // #define USE_BAKER_READ_BARRIER 28 // #define USE_BROOKS_READ_BARRIER 29 30 #if defined(USE_BAKER_READ_BARRIER) || defined(USE_BROOKS_READ_BARRIER) 31 #define USE_BAKER_OR_BROOKS_READ_BARRIER 32 #endif 33 34 #if defined(USE_BAKER_READ_BARRIER) && defined(USE_BROOKS_READ_BARRIER) 35 #error "Only one of Baker or Brooks can be enabled at a time." 36 #endif 37 38 // A placeholder marker to indicate places to add read barriers in the 39 // assembly code. This is a development time aid and to be removed 40 // after read barriers are added. 41 #define THIS_LOAD_REQUIRES_READ_BARRIER 42 43 #endif // ART_RUNTIME_READ_BARRIER_C_H_ 44