* src/native/vm/java_lang_Thread.c [ENABLE_THREADS]
(threads/native/threads.h): Removed.
(threads/threads-common.h): Added.
(vm/stringlocal.h): Likewise.
(vm/vm.h): Removed.
(getState): Implemented.
* src/threads/threads-common.c (vm/vm.h): Added.
(threads_get_state): New function.
(threads_dump): Print thread state.
* src/threads/threads-common.h (THREAD_STATE_NEW)
(THREAD_STATE_RUNNABLE, THREAD_STATE_BLOCKED, THREAD_STATE_WAITING)
(THREAD_STATE_TIMED_WAITING, THREAD_STATE_TERMINATED): Defined.
(threads_get_state): Added.
* src/threads/native/threads.c (threads_init): Set thread-state.
(threads_startup_thread): Likewise.
(threads_attach_current_thread): Likewise.
(threads_detach_thread): Likewise.
(threads_wait_with_timeout): Likewise.
* src/threads/native/threads.h (threadobject): Added state field.
* src/native/native.c (dummynativetable) [ENABLE_JAVASE]: Added
Java_java_lang_VMThread_getState.