blob: 6f94d38870ea6d92b0023d4c17a257080083a92f [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)
Andreas Gampe542451c2016-07-26 09:02:02 -070020#include "base/enums.h" // PointerSize
Igor Murashkin311fdf52016-07-22 15:59:16 -070021#include "stack.h" // art::ShadowFrame
22#endif
23
24#include "common.def" // DEFINE_OFFSET_EXPR
25
26#define DEFINE_THREAD_OFFSET(field_name, method_name) \
Andreas Gampe542451c2016-07-26 09:02:02 -070027 DEFINE_OFFSET_EXPR(Thread, field_name, int32_t, art::Thread::method_name##Offset<art::kRuntimePointerSize>().Int32Value())
Igor Murashkin311fdf52016-07-22 15:59:16 -070028
29// New macro suffix Method Name (of the Offset method)
30DEFINE_THREAD_OFFSET(FLAGS, ThreadFlags)
31DEFINE_THREAD_OFFSET(ID, ThinLockId)
32DEFINE_THREAD_OFFSET(IS_GC_MARKING, IsGcMarking)
33DEFINE_THREAD_OFFSET(CARD_TABLE, CardTable)
34
35// TODO: The rest of the offsets
36// are dependent on __SIZEOF_POINTER__
37
38#undef DEFINE_THREAD_OFFSET
39
40#include "common_undef.def" // undef DEFINE_OFFSET_EXPR