blob: 71648e6cdb65d5f002f90b401e952abf9a7874aa [file] [log] [blame]
Igor Murashkin311fdf52016-07-22 15:59:16 -07001/*
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// Offsets within ShadowFrame.
18
19#if defined(DEFINE_INCLUDE_DEPENDENCIES)
20#include "stack.h" // art::ShadowFrame
21#endif
22
23#include "common.def" // DEFINE_OFFSET_EXPR
24
25#define DEFINE_THREAD_OFFSET(field_name, method_name) \
26 DEFINE_OFFSET_EXPR(Thread, field_name, int32_t, art::Thread::method_name##Offset<sizeof(void*)>().Int32Value())
27
28// New macro suffix Method Name (of the Offset method)
29DEFINE_THREAD_OFFSET(FLAGS, ThreadFlags)
30DEFINE_THREAD_OFFSET(ID, ThinLockId)
31DEFINE_THREAD_OFFSET(IS_GC_MARKING, IsGcMarking)
32DEFINE_THREAD_OFFSET(CARD_TABLE, CardTable)
33
34// TODO: The rest of the offsets
35// are dependent on __SIZEOF_POINTER__
36
37#undef DEFINE_THREAD_OFFSET
38
39#include "common_undef.def" // undef DEFINE_OFFSET_EXPR