Igor Murashkin | 311fdf5 | 2016-07-22 15:59:16 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2016 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 | // Export lockword values. |
| 18 | |
| 19 | #if defined(DEFINE_INCLUDE_DEPENDENCIES) |
| 20 | #include "lock_word.h" // art::LockWord |
| 21 | #endif |
| 22 | |
| 23 | #define DEFINE_LOCK_WORD_EXPR(macro_name, type, constant_field_name) \ |
| 24 | DEFINE_EXPR(LOCK_WORD_ ## macro_name, type, art::LockWord::constant_field_name) |
| 25 | |
| 26 | DEFINE_LOCK_WORD_EXPR(STATE_SHIFT, int32_t, kStateShift) |
| 27 | DEFINE_LOCK_WORD_EXPR(STATE_MASK, uint32_t, kStateMaskShifted) |
| 28 | DEFINE_LOCK_WORD_EXPR(READ_BARRIER_STATE_SHIFT, int32_t, kReadBarrierStateShift) |
| 29 | DEFINE_LOCK_WORD_EXPR(READ_BARRIER_STATE_MASK, uint32_t, kReadBarrierStateMaskShifted) |
| 30 | DEFINE_LOCK_WORD_EXPR(READ_BARRIER_STATE_MASK_TOGGLED, uint32_t, kReadBarrierStateMaskShiftedToggled) |
| 31 | DEFINE_LOCK_WORD_EXPR(THIN_LOCK_COUNT_ONE, int32_t, kThinLockCountOne) |
| 32 | |
Mathieu Chartier | 6f198e3 | 2016-11-03 11:15:04 -0700 | [diff] [blame] | 33 | DEFINE_LOCK_WORD_EXPR(STATE_FORWARDING_ADDRESS, uint32_t, kStateForwardingAddress) |
Mathieu Chartier | 1cf194f | 2016-11-01 20:13:24 -0700 | [diff] [blame] | 34 | DEFINE_LOCK_WORD_EXPR(STATE_FORWARDING_ADDRESS_OVERFLOW, uint32_t, kStateForwardingAddressOverflow) |
| 35 | DEFINE_LOCK_WORD_EXPR(STATE_FORWARDING_ADDRESS_SHIFT, uint32_t, kForwardingAddressShift) |
| 36 | |
Mathieu Chartier | 36a270a | 2016-07-28 18:08:51 -0700 | [diff] [blame] | 37 | DEFINE_LOCK_WORD_EXPR(GC_STATE_MASK_SHIFTED, uint32_t, kGCStateMaskShifted) |
| 38 | DEFINE_LOCK_WORD_EXPR(GC_STATE_MASK_SHIFTED_TOGGLED, uint32_t, kGCStateMaskShiftedToggled) |
| 39 | DEFINE_LOCK_WORD_EXPR(GC_STATE_SHIFT, int32_t, kGCStateShift) |
| 40 | |
| 41 | DEFINE_LOCK_WORD_EXPR(MARK_BIT_SHIFT, int32_t, kMarkBitStateShift) |
| 42 | DEFINE_LOCK_WORD_EXPR(MARK_BIT_MASK_SHIFTED, uint32_t, kMarkBitStateMaskShifted) |
| 43 | |
Igor Murashkin | 311fdf5 | 2016-07-22 15:59:16 -0700 | [diff] [blame] | 44 | #undef DEFINE_LOCK_WORD_EXPR |
| 45 | |