1 /* 2 * Copyright (C) 2009 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 /* 18 * System thread support. 19 */ 20 #ifndef _DALVIK_SYSTEM_THREAD 21 #define _DALVIK_SYSTEM_THREAD 22 23 #include "Thread.h" 24 25 /* 26 * Queries the system thread status for the given thread. If the thread is in 27 * native code, this function queries the system thread state and converts it 28 * to an equivalent ThreadStatus. If the system thread state is "paging", 29 * this function returns THREAD_WAIT. If the native status can't be read, 30 * this function returns THREAD_NATIVE. The thread list lock should be held 31 * when calling this function. 32 */ 33 ThreadStatus dvmGetSystemThreadStatus(Thread* thread); 34 35 /* 36 * Frees system thread-specific state in the given thread. The thread list 37 * lock is *not* held when this function is invoked. 38 */ 39 void dvmDetachSystemThread(Thread* thread); 40 41 #endif /*_DALVIK_SYSTEM_THREAD*/ 42