harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wjwashb...@apache.org
Subject svn commit: r556704 [1/5] - in /harmony/enhanced/drlvm/trunk: build/make/ build/make/components/vm/ build/make/targets/ vm/include/ vm/include/open/ vm/interpreter/src/ vm/port/src/lil/em64t/pim/ vm/port/src/lil/ia32/pim/ vm/port/src/lil/ipf/pim/ vm/te...
Date Mon, 16 Jul 2007 19:32:52 GMT
Author: wjwashburn
Date: Mon Jul 16 12:32:35 2007
New Revision: 556704

URL: http://svn.apache.org/viewvc?view=rev&rev=556704
Log:
Harmony-3985:  this is general cleanup of thread data structs and
is a precursor to fixing thread lifecycle



Added:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/drlvm/thread/
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/drlvm/thread/ThreadHelper.java
      - copied unchanged from r556643, harmony/enhanced/drlvm/trunk/vm/thread/javasrc/org/apache/harmony/drlvm/thread/ThreadHelper.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/helpers/
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/helpers/thread_helpers.cpp
      - copied, changed from r556643, harmony/enhanced/drlvm/trunk/vm/thread/src/thread_helpers.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/helpers/thread_helpers_ipf.cpp
      - copied, changed from r556643, harmony/enhanced/drlvm/trunk/vm/thread/src/thread_helpers_ipf.c
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_java_attrs.cpp
      - copied, changed from r556643, harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_attrs.c
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_java_basic.cpp
      - copied, changed from r556643, harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_basic.c
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_java_interrupt.cpp
      - copied, changed from r556643, harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_interrupt.c
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_java_iterator.cpp
      - copied, changed from r556643, harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_iterator.c
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_java_monitors.cpp
      - copied, changed from r556643, harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_monitors.c
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_java_park.cpp
      - copied, changed from r556643, harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_park.c
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_java_suspend.cpp
      - copied, changed from r556643, harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_suspend.c
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_private.h
      - copied unchanged from r556643, harmony/enhanced/drlvm/trunk/vm/thread/src/thread_private.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_ti_instr.cpp
      - copied, changed from r556643, harmony/enhanced/drlvm/trunk/vm/thread/src/thread_ti_instr.c
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_ti_monitors.cpp
      - copied, changed from r556643, harmony/enhanced/drlvm/trunk/vm/thread/src/thread_ti_monitors.c
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_ti_others.cpp
      - copied, changed from r556643, harmony/enhanced/drlvm/trunk/vm/thread/src/thread_ti_others.c
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_ti_timing.cpp
      - copied, changed from r556643, harmony/enhanced/drlvm/trunk/vm/thread/src/thread_ti_timing.c
Removed:
    harmony/enhanced/drlvm/trunk/build/make/components/vm/jthread.xml
    harmony/enhanced/drlvm/trunk/vm/thread/javasrc/
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_helpers.cpp
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_helpers_ipf.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_attrs.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_basic.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_interrupt.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_iterator.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_monitors.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_park.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_suspend.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_ti_instr.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_ti_monitors.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_ti_others.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_ti_timing.c
Modified:
    harmony/enhanced/drlvm/trunk/build/make/components/vm/hythr.xml
    harmony/enhanced/drlvm/trunk/build/make/components/vm/vmcore.xml
    harmony/enhanced/drlvm/trunk/build/make/deploy.xml
    harmony/enhanced/drlvm/trunk/build/make/targets/common_vm.xml
    harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml
    harmony/enhanced/drlvm/trunk/vm/include/interpreter_exports.h
    harmony/enhanced/drlvm/trunk/vm/include/jvmti_support.h
    harmony/enhanced/drlvm/trunk/vm/include/open/hythread.h
    harmony/enhanced/drlvm/trunk/vm/include/open/hythread_ext.h
    harmony/enhanced/drlvm/trunk/vm/include/open/jthread.h
    harmony/enhanced/drlvm/trunk/vm/include/open/thread_externals.h
    harmony/enhanced/drlvm/trunk/vm/include/open/ti_thread.h
    harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_exports.cpp
    harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp
    harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter_ti.cpp
    harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/m2n_em64t.cpp
    harmony/enhanced/drlvm/trunk/vm/port/src/lil/ia32/pim/m2n_ia32.cpp
    harmony/enhanced/drlvm/trunk/vm/port/src/lil/ipf/pim/m2n_ipf.cpp
    harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_basic.c
    harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_identify.c
    harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_ptr_conv.c
    harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_basic.c
    harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_fat_monitor.c
    harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_suspend.c
    harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_thin_monitor.c
    harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_instrum.c
    harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_local_storage.c
    harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_monitor_info.c
    harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_state.c
    harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/utils/thread_unit_test_utils.c
    harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/utils/thread_unit_test_utils.h
    harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.def
    harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.exp
    harmony/enhanced/drlvm/trunk/vm/thread/src/linux/os_thread.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_init.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_basic.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_condvar.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_fat_monitor.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_interrupt.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_suspend.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_thin_monitor.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_tls.c
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_private.h
    harmony/enhanced/drlvm/trunk/vm/thread/src/win/os_thread.c
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/Class.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/exceptions_type.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/jvmti_internal.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/native_stack.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/thread_manager.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/vm_core_types.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/vm_threads.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions_jit.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/root_set_enum_common.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/ini.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_break_intf.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_event.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_pop_frame.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_roots.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_stack.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_step.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_thread.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_VMThreadManager.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_lang_management_ThreadMXBeanImpl.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/object/object_handles.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/lock_manager.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_dump.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_generic.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_manager.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/native_stack_em64t.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/native_stack_ia32.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/ini_ipf.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/native_stack_ipf.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/native_stack.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/ia32_em64t/nt_exception_filter_common.cpp

Modified: harmony/enhanced/drlvm/trunk/build/make/components/vm/hythr.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/components/vm/hythr.xml?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/components/vm/hythr.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/components/vm/hythr.xml Mon Jul 16 12:32:35 2007
@@ -43,9 +43,7 @@
             </includepath>
 
             <fileset dir="${src}">
-                <include name="thread/src/*native*.c" />
-                <!-- include name="thread/src/*task*.c" / -->
-                <include name="thread/src/thread_init.c" />
+                <include name="thread/src/*.c" />
                 <select os="win">
                   <include name="thread/src/win/*.c" />
                 </select>
@@ -114,23 +112,6 @@
                 <syslibset libs="advapi32,ws2_32" />
             </select>
         </linker>
-
-         <!-- Java helpers -->
-        <property name="build.java.depends" value=""/>
-
-        <property name="java.source.dir"
-                  location="${build.vm.home}/thread/javasrc"/>
-
-        <path id="java.class.path">
-            <pathelement location="${java.build.dir}"/>
-
-            <fileset dir="${external.dep.CLASSLIB.jardir}" includes="*.jar" />
-            <pathelement location="${vm.kernel_classes.jardir}/kernel.jar"/>
-            <fileset dir="${build.VMMAGIC.home}" includes="vmmagic-20070207.jar" />
-        </path>
-
-        <property name="jarname" value="hythr.jar"/>
-        <property name="srcjarname" value="hythr-src.jar"/>
 
     </target>
 </project>

Modified: harmony/enhanced/drlvm/trunk/build/make/components/vm/vmcore.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/components/vm/vmcore.xml?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/components/vm/vmcore.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/components/vm/vmcore.xml Mon Jul 16 12:32:35 2007
@@ -48,7 +48,7 @@
                                               extra.log4cxx,
                                               extra.zlib,
                                               vm.encoder,
-                                              vm.port, vm.hythr, vm.jthread" />
+                                              vm.port, vm.hythr" />
 
         <property name="libname" value="harmonyvm" />
         <property name="outtype" value="shared" />
@@ -82,6 +82,10 @@
                 <include name="reflection/*.cpp" />
                 <include name="stack/*.cpp" />
                 <include name="thread/*.cpp" />
+                <select arch="ia32">
+                    <include name="thread/helpers/thread_helpers.cpp" />
+                    <include name="thread/helpers/thread_helpers_${build.arch}.cpp" />
+                </select>
                 <include name="util/*.cpp" />
                 <include name="verifier/*.cpp" unless="use_verifier_3363"/>
                 <include name="verifier-3363/*.cpp" if="use_verifier_3363"/>
@@ -318,9 +322,6 @@
 
             <libset libs="${vm.hythr.lib}"
                     dir="${vm.hythr.libdir}" />
-
-            <libset libs="${vm.jthread.lib}"
-                    dir="${vm.jthread.libdir}" />
 
             <libset libs="${vm.port.lib}"
                     dir="${vm.port.libdir}" />

Modified: harmony/enhanced/drlvm/trunk/build/make/deploy.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/deploy.xml?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/deploy.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/deploy.xml Mon Jul 16 12:32:35 2007
@@ -70,7 +70,6 @@
 
         <hythr>
             <shared>bin/default:hythr</shared>
-            <jar>bin/default:hythr</jar>
         </hythr>
      </vm>
 

Modified: harmony/enhanced/drlvm/trunk/build/make/targets/common_vm.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/common_vm.xml?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/common_vm.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/common_vm.xml Mon Jul 16 12:32:35 2007
@@ -240,7 +240,7 @@
             <pathelement location="${build.VM.home}/tests/unit/framework" />
             <pathelement location="${build.VM.home}/include" />
             <pathelement location="${build.VM.home}/include/open" />
-            <pathelement location="${build.VM.home}/thread/src" />
+            <pathelement location="${build.VM.home}/vmcore/src/thread" />
             <pathelement location="${build.VM.home}/port/include" />
         </path>
     </target>

Modified: harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml Mon Jul 16 12:32:35 2007
@@ -134,7 +134,6 @@
                         <libset libs="port" dir="${build.semi.dir}/vm/port/_bin" />
                         <libset libs="log4cxx" dir="${build.semi.dir}/extra/log4cxx/_bin" />
                         <libset libs="hyzlib" dir="${external.dep.CLASSLIB}/deploy/jdk/jre/bin" />
-                        <libset libs="jthread" dir="${build.semi.dir}/vm/jthread/_bin" />
                         <libset libs="harmonyvm" dir="${build.semi.dir}/vm/vmcore/_bin" />
                         <libset libs="icuuc" dir="${external.dep.CLASSLIB.libdir}" />
                         <select os="win">
@@ -182,7 +181,8 @@
                               resultproperty="resultproperty"
                               outputproperty="outputproperty">
                     <arg value="-Dorg.apache.harmony.vm.vmdir=${build.deploy.dir}/jdk/jre/bin/default"/>
-                    <arg line="-Djava.home=${build.deploy.dir}/jdk/jre ${test.vmargs}"/>
+                    <arg value="-Djava.home=${build.deploy.dir}/jdk/jre ${test.vmargs}"/>
+                    <arg value="-XX:vm.jvmti.enabled=true"/>
                     <env key="JAVA_HOME" value="${build.deploy.dir}/jdk/jre" />
                     <select os="win">
                         <env key="Path" path="${build.deploy.dir}/jdk/jre/bin/:${build.deploy.dir}/jdk/jre/bin/default:${env.Path}" />

Modified: harmony/enhanced/drlvm/trunk/vm/include/interpreter_exports.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/interpreter_exports.h?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/interpreter_exports.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/interpreter_exports.h Mon Jul 16 12:32:35 2007
@@ -61,20 +61,20 @@
  * @param[out] stfs      - the pointer to the array of stack trace frames
  *                         created by this function and returned via this pointer
  * @note The caller is responsible for freeing the memory.*/
-    void (*interpreter_st_get_trace) (class VM_thread *thread, unsigned* res_depth, struct StackTraceFrame** stfs);
+    void (*interpreter_st_get_trace) (struct VM_thread *thread, unsigned* res_depth, struct StackTraceFrame** stfs);
 
 /**
  * Enumerates references associated with the thread.
  *
  * @param thread - the pointer to the thread*/
-    void (*interpreter_enumerate_thread) (class VM_thread *thread);
+    void (*interpreter_enumerate_thread) (struct VM_thread *thread);
 
 /**
  * Returns the last frame.
  *
  * @param thread - the pointer to the thread
  * @return The pointer to the last frame.*/
-    FrameHandle* (*interpreter_get_last_frame) (class VM_thread *thread);
+    FrameHandle* (*interpreter_get_last_frame) (struct VM_thread *thread);
 
 /** Returns the previous frame.
  *
@@ -111,7 +111,7 @@
  *
  * @param thread   - the pointer to the thread
  * @param jvmtiEnv - the pointer to the jvmti environment*/
-    void (*interpreter_ti_enumerate_thread) (jvmtiEnv*, class VM_thread *thread);
+    void (*interpreter_ti_enumerate_thread) (jvmtiEnv*, struct VM_thread *thread);
 
 #ifdef _IPF_
 /**
@@ -133,7 +133,7 @@
  * @param jlocation  - the pointer to the location
  * @return <code>JVMTI_ERROR_NONE</code> - a successfully added notification<br>
  *         <code>JVMTI_ERROR_NO_MORE_FRAMES</code> - depth is too large*/
-    jvmtiError (*interpreter_ti_getFrameLocation) ( jvmtiEnv*, class VM_thread*,
+    jvmtiError (*interpreter_ti_getFrameLocation) ( jvmtiEnv*, struct VM_thread*,
             int, struct _jmethodID * *, int64 *);
 
 /**
@@ -149,7 +149,7 @@
  *         <code>JVMTI_ERROR_OPAQUE_FRAME</code>   - no frame<br>
  *         <code>JVMTI_ERROR_INVALID_SLOT</code>   - a bad slot<br>
  *         <code>JVMTI_ERROR_TYPE_MISMATCH</code>  - an invalid variable type*/
-    jvmtiError (*interpreter_ti_getLocal32) ( jvmtiEnv*, class VM_thread*, int, int, int *);
+    jvmtiError (*interpreter_ti_getLocal32) ( jvmtiEnv*, struct VM_thread*, int, int, int *);
 
 /**
  * Returns the value of 64 bit local variable.
@@ -164,7 +164,7 @@
  *         <code>JVMTI_ERROR_OPAQUE_FRAME</code>   - no frame<br>
  *         <code>JVMTI_ERROR_INVALID_SLOT</code>   - a bad slot<br>
  *         <code>JVMTI_ERROR_TYPE_MISMATCH</code>  - an invalid variable type*/
-    jvmtiError (*interpreter_ti_getLocal64) ( jvmtiEnv*, class VM_thread*, int, int, int64 *);
+    jvmtiError (*interpreter_ti_getLocal64) ( jvmtiEnv*, struct VM_thread*, int, int, int64 *);
 
 /**
  * Returns the value of the <code>Object</code> type local variable.
@@ -179,7 +179,7 @@
  *         <code>JVMTI_ERROR_OPAQUE_FRAME</code>   - no frame<br>
  *         <code>JVMTI_ERROR_INVALID_SLOT</code>   - a bad slot<br>
  *         <code>JVMTI_ERROR_TYPE_MISMATCH</code>  - an invalid variable type*/
-    jvmtiError (*interpreter_ti_getObject) ( jvmtiEnv*, class VM_thread*, int, int, struct _jobject * *);
+    jvmtiError (*interpreter_ti_getObject) ( jvmtiEnv*, struct VM_thread*, int, int, struct _jobject * *);
 
 /**
  * Returns stack trace data.
@@ -192,7 +192,7 @@
  * @param count_ptr       - the pointer to the count
  * @return <code>JVMTI_ERROR_NONE</code>             - a successfully added notification<br>
  *         <code>JVMTI_ERROR_ILLEGAL_ARGUMENT</code> - bad arguments*/
-    jvmtiError (*interpreter_ti_getStackTrace) (jvmtiEnv*, class VM_thread*, int, int, jvmtiFrameInfo*, int *);
+    jvmtiError (*interpreter_ti_getStackTrace) (jvmtiEnv*, struct VM_thread*, int, int, jvmtiFrameInfo*, int *);
 
 /**
  * Returns frame count.
@@ -201,7 +201,7 @@
  * @param thread         - the pointer to the thread
  * @param count_ptr[out] - the pointer to the count
  * @return <code>JVMTI_ERROR_NONE</code> - a successfully added notification*/
-    jvmtiError (*interpreter_ti_get_frame_count) ( jvmtiEnv*, class VM_thread*, int *);
+    jvmtiError (*interpreter_ti_get_frame_count) ( jvmtiEnv*, struct VM_thread*, int *);
 
 /**
  * Sets the value of 32 bit local variable.
@@ -216,7 +216,7 @@
  *         <code>JVMTI_ERROR_OPAQUE_FRAME</code>   - no frame<br>
  *         <code>JVMTI_ERROR_INVALID_SLOT</code>   - a bad slot<br>
  *         <code>JVMTI_ERROR_TYPE_MISMATCH</code>  - an invalid variable type*/
-    jvmtiError (*interpreter_ti_setLocal32) ( jvmtiEnv*, class VM_thread*, int, int, int);
+    jvmtiError (*interpreter_ti_setLocal32) ( jvmtiEnv*, struct VM_thread*, int, int, int);
 
 /**
  * Sets the value of 64 bit local variable.
@@ -231,7 +231,7 @@
  *         <code>JVMTI_ERROR_OPAQUE_FRAME</code>   - no frame<br>
  *         <code>JVMTI_ERROR_INVALID_SLOT</code>   - a bad slot<br>
  *         <code>JVMTI_ERROR_TYPE_MISMATCH</code>  - an invalid variable type<br>*/
-    jvmtiError (*interpreter_ti_setLocal64) ( jvmtiEnv*, class VM_thread*, int, int, int64);
+    jvmtiError (*interpreter_ti_setLocal64) ( jvmtiEnv*, struct VM_thread*, int, int, int64);
 
 /**
  * Sets the value of the <code>Object</code> type local variable.
@@ -246,14 +246,14 @@
  *         <code>JVMTI_ERROR_OPAQUE_FRAME</code>   - no frame<br>
  *         <code>JVMTI_ERROR_INVALID_SLOT</code>   - a bad slot<br>
  *         <code>JVMTI_ERROR_TYPE_MISMATCH</code>  - an invalid variable type*/
-    jvmtiError (*interpreter_ti_setObject) ( jvmtiEnv*, class VM_thread*, int, int, struct _jobject *);
+    jvmtiError (*interpreter_ti_setObject) ( jvmtiEnv*, struct VM_thread*, int, int, struct _jobject *);
 
 /**
  * Returns the interrupted method native bit.
  *
  * @param thread - the pointer to the thread
  * @return The interrupted method native bit.*/
-    unsigned int (*interpreter_st_get_interrupted_method_native_bit) (class VM_thread *);
+    unsigned int (*interpreter_st_get_interrupted_method_native_bit) (struct VM_thread *);
 
 /** @defgroup open_interfaces Open Interfaces
  * Open interfaces.*/

Modified: harmony/enhanced/drlvm/trunk/vm/include/jvmti_support.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/jvmti_support.h?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/jvmti_support.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/jvmti_support.h Mon Jul 16 12:32:35 2007
@@ -51,12 +51,12 @@
 /**
  * Requests interpreter to enumerate one thread for TI.
  */
-void interpreter_ti_enumerate_thread(jvmtiEnv *env, class VM_thread *thread);
+void interpreter_ti_enumerate_thread(jvmtiEnv *env, struct VM_thread *thread);
 
 /**
  * Requests JIT support to enumerate one thread for TI.
  */
-void jitted_ti_enumerate_thread(jvmtiEnv *env, class VM_thread *thread);
+void jitted_ti_enumerate_thread(jvmtiEnv *env, struct VM_thread *thread);
 
 
 #endif // _JVMTI_SUPPORT_H_

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/hythread.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/hythread.h?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/hythread.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/hythread.h Mon Jul 16 12:32:35 2007
@@ -348,7 +348,7 @@
      * for current thread only.
      *
      * Also disable_count could be reset to value 0 and restored in
-     * reset_suspend_disable()/set_suspend_disable() function
+     * hythread_reset_suspend_disable()/hythread_set_suspend_disable() function
      * for current thread only.
      *
      * Function hythread_exception_safe_point() sets disable_count to

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/hythread_ext.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/hythread_ext.h?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/hythread_ext.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/hythread_ext.h Mon Jul 16 12:32:35 2007
@@ -153,13 +153,17 @@
 #include "hycond_win.h"
 #endif // _WIN32
 
+#if !defined (_IPF_)
+//use lock reservation
+#define LOCK_RESERVATION
+#endif // !defined (_IPF_)
 
 typedef struct HyLatch *hylatch_t;
 
 typedef struct HyThread *hythread_iterator_t;
 typedef struct HyThreadLibrary *hythread_library_t;
 
-typedef I_32  hythread_thin_monitor_t;
+typedef U_32  hythread_thin_monitor_t;
 
 typedef void (*hythread_event_callback_proc)(void);
 
@@ -200,8 +204,6 @@
 IDATA hythread_group_create(hythread_group_t *group);
 IDATA VMCALL hythread_group_release(hythread_group_t group);
 IDATA VMCALL hythread_group_get_list(hythread_group_t **list, int* size);
-void* VMCALL hythread_get_private_data(hythread_t  t);
-IDATA VMCALL hythread_set_private_data(hythread_t  t, void* data);
 
 UDATA VMCALL hythread_tls_get_offset(hythread_tls_key_t key);
 UDATA VMCALL hythread_tls_get_request_offset();
@@ -210,6 +212,22 @@
 UDATA VMCALL hythread_uses_fast_tls(void);
 IDATA VMCALL hythread_get_hythread_offset_in_tls(void);
 
+IDATA VMCALL hythread_thread_lock(hythread_t thread);
+IDATA VMCALL hythread_thread_unlock(hythread_t thread);
+IDATA VMCALL hythread_get_state(hythread_t thread);
+IDATA VMCALL hythread_set_state(hythread_t thread, IDATA state);
+int VMCALL hythread_reset_suspend_disable();
+void VMCALL hythread_set_suspend_disable(int count);
+int VMCALL hythread_is_fat_lock(hythread_thin_monitor_t lockword);
+hythread_monitor_t VMCALL hythread_inflate_lock(hythread_thin_monitor_t *lockword_ptr);
+IDATA VMCALL hythread_owns_thin_lock(hythread_t thread, hythread_thin_monitor_t lockword);
+IDATA VMCALL hythread_unreserve_lock(hythread_thin_monitor_t *lockword_ptr);
+IDATA VMCALL hythread_get_thread_id_offset();
+IDATA VMCALL hythread_set_thread_stop_callback(hythread_t thread, hythread_event_callback_proc stop_callback);
+IDATA VMCALL hythread_wait_for_nondaemon_threads(hythread_t thread, IDATA threads_to_keep);
+IDATA VMCALL hythread_increase_nondaemon_threads_count(hythread_t thread);
+IDATA VMCALL hythread_decrease_nondaemon_threads_count(hythread_t thread, IDATA threads_to_keep);
+
 //@}
 /** @name Conditional variable
  */
@@ -489,7 +507,11 @@
 
 // possible values for tm_status_t
 #define TM_OS_ERROR (TM_ERROR_START+1)
-    
+
+#define TM_MAX_OWNED_MONITOR_NUMBER 200 //FIXME: switch to dynamic resize
+// if default stack size is not through -Xss parameter, it is 256kb
+#define TM_DEFAULT_STACKSIZE (512 * 1024)
+
 #if defined(__cplusplus)
 }
 #endif

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/jthread.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/jthread.h?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/jthread.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/jthread.h Mon Jul 16 12:32:35 2007
@@ -35,64 +35,38 @@
  * <code>vm/thread/doc/ThreadManager.htm</code>
  */
 
-#include "open/types.h"
-#include "open/hythread_ext.h"
 #include <jni.h>
 #include <jvmti.h>
+#include "open/types.h"
+#include "open/hythread_ext.h"
+#include "open/ti_thread.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
 
-
 /** 
  * @name Basic manipulation
  */
 //@{
 
 typedef struct JVMTIThread *jvmti_thread_t;
+typedef struct jthread_thread_attr jthread_threadattr_t;
+typedef struct VM_thread * vm_thread_t;
 
-/**
- * Java thread creation attributes.
- */
-typedef struct {
-  
-   /**
-    * Thread scheduling priority.
-    */  
-    jint priority;
-
-   /**
-    * Thread stack size.
-    */  
-    jint stacksize;
-
-   /**
-    * Denotes whether Java thread is daemon.  
-    * JVM exits when the only threads running are daemon threads.
-    */  
-    jboolean daemon;
-
-   /**
-    * JVM TI Environment.
-    */  
-    jvmtiEnv * jvmti_env;
-
-} jthread_threadattr_t;
-
-jlong jthread_thread_init(jvmti_thread_t *ret_thread, JNIEnv* env, jthread java_thread, jobject weak_ref, jlong old_thread);
-IDATA jthread_create(JNIEnv * jni_env, jthread thread, jthread_threadattr_t *attrs);
-IDATA jthread_create_with_function(JNIEnv * jni_env, jthread thread, jthread_threadattr_t *attrs, jvmtiStartFunction proc, const void* arg);
-IDATA jthread_attach(JNIEnv * jni_env, jthread thread, jboolean daemon);
- IDATA jthread_detach(jthread thread);
-IDATA jthread_join(jthread thread);
-IDATA jthread_timed_join(jthread thread, jlong millis, jint nanos);
-IDATA jthread_yield();
-IDATA jthread_stop(jthread thread);
-IDATA jthread_exception_stop(jthread thread, jobject throwable);
-IDATA jthread_sleep(jlong millis, jint nanos);
-JNIEnv *jthread_get_JNI_env(jthread thread);
-IDATA jthread_wait_for_all_nondaemon_threads();
+VMEXPORT jlong jthread_thread_init(JNIEnv* env, jthread java_thread, jobject weak_ref, hythread_t old_thread);
+VMEXPORT IDATA jthread_create(JNIEnv * jni_env, jthread thread, jthread_threadattr_t *attrs);
+VMEXPORT IDATA jthread_create_with_function(JNIEnv * jni_env, jthread thread, jthread_threadattr_t *attrs);
+VMEXPORT IDATA jthread_attach(JNIEnv * jni_env, jthread thread, jboolean daemon);
+VMEXPORT IDATA jthread_detach(jthread thread);
+VMEXPORT IDATA jthread_join(jthread thread);
+VMEXPORT IDATA jthread_timed_join(jthread thread, jlong millis, jint nanos);
+VMEXPORT IDATA jthread_yield();
+VMEXPORT IDATA jthread_stop(jthread thread);
+VMEXPORT IDATA jthread_exception_stop(jthread thread, jobject throwable);
+VMEXPORT IDATA jthread_sleep(jlong millis, jint nanos);
+VMEXPORT JNIEnv *jthread_get_JNI_env(jthread thread);
+VMEXPORT IDATA jthread_wait_for_all_nondaemon_threads();
 
 
 
@@ -101,9 +75,9 @@
  */
 //@{
 
-jthread jthread_self(void);
-jlong jthread_get_id(jthread thread);
-jthread jthread_get_thread(jlong thread_id);
+VMEXPORT jthread jthread_self(void);
+VMEXPORT jlong jthread_get_id(jthread thread);
+VMEXPORT jthread jthread_get_thread(jlong thread_id);
 
 
 
@@ -113,8 +87,8 @@
 //@{
 
 
-hythread_t  jthread_get_native_thread(jthread thread);
-jthread jthread_get_java_thread(hythread_t thread);
+VMEXPORT hythread_t  jthread_get_native_thread(jthread thread);
+VMEXPORT jthread jthread_get_java_thread(hythread_t thread);
 
 
 //@}
@@ -123,9 +97,9 @@
 //@{
 
 
-IDATA jthread_set_priority(jthread thread, int priority);
-int jthread_get_priority(jthread thread);
-jboolean jthread_is_daemon(jthread thread);
+VMEXPORT IDATA jthread_set_priority(jthread thread, jint priority);
+VMEXPORT jint jthread_get_priority(jthread thread);
+VMEXPORT jboolean jthread_is_daemon(jthread thread);
 
 /**
  * Sets the name for the <code>thread</code>.
@@ -135,7 +109,7 @@
  *
  * @sa <code>java.lang.Thread.setName()</code>
  */
-IDATA jthread_set_name(jthread thread, jstring name);
+VMEXPORT IDATA jthread_set_name(jthread thread, jstring name);
 
 /**
  * Returns the name for the <code>thread</code>.
@@ -144,7 +118,7 @@
  *
  * @sa <code>java.lang.Thread.getName()</code>
  */
-jstring jthread_get_name(jthread thread);
+VMEXPORT jstring jthread_get_name(jthread thread);
 
 
 //@}
@@ -152,9 +126,9 @@
  */
 //@{
 
-IDATA jthread_interrupt(jthread thread);
-jboolean jthread_is_interrupted(jthread thread);
-IDATA jthread_clear_interrupted(jthread thread);
+VMEXPORT IDATA jthread_interrupt(jthread thread);
+VMEXPORT jboolean jthread_is_interrupted(jthread thread);
+VMEXPORT IDATA jthread_clear_interrupted(jthread thread);
 
 
 //@}
@@ -162,36 +136,35 @@
  */
 //@{
 
- IDATA jthread_monitor_init(jobject mon);
+VMEXPORT IDATA jthread_monitor_init(jobject mon);
 VMEXPORT IDATA jthread_monitor_enter(jobject mon);
- IDATA jthread_monitor_try_enter(jobject mon);
+VMEXPORT IDATA jthread_monitor_try_enter(jobject mon);
 VMEXPORT IDATA jthread_monitor_exit(jobject mon);
- IDATA jthread_monitor_notify(jobject mon);
- IDATA jthread_monitor_notify_all(jobject mon);
- IDATA jthread_monitor_wait(jobject mon);
- IDATA jthread_monitor_timed_wait(jobject mon, jlong millis, jint nanos);
+VMEXPORT IDATA jthread_monitor_notify(jobject mon);
+VMEXPORT IDATA jthread_monitor_notify_all(jobject mon);
+VMEXPORT IDATA jthread_monitor_wait(jobject mon);
+VMEXPORT IDATA jthread_monitor_timed_wait(jobject mon, jlong millis, jint nanos);
 
 //@}
 /** @name Parking
  */
 //@{
 
- IDATA jthread_park();
- IDATA jthread_timed_park(jlong millis, jint nanos);
- IDATA jthread_unpark(jthread thread);
- IDATA jthread_park_until(jlong milis);
+VMEXPORT IDATA jthread_park();
+VMEXPORT IDATA jthread_timed_park(jlong millis, jint nanos);
+VMEXPORT IDATA jthread_unpark(jthread thread);
+VMEXPORT IDATA jthread_park_until(jlong milis);
 
 //@}
 /** @name Suspension
  */
 //@{
 
- IDATA jthread_suspend(jthread thread);
- IDATA jthread_suspend_all(jvmtiError* results, jint count, const jthread* thread_list);
- IDATA jthread_resume(jthread thread);
- IDATA jthread_resume_all(jvmtiError* results, jint count, const jthread* thread_list);
- IDATA jthread_cancel_all();
-
+VMEXPORT IDATA jthread_suspend(jthread thread);
+VMEXPORT IDATA jthread_suspend_all(jvmtiError* results, jint count, const jthread* thread_list);
+VMEXPORT IDATA jthread_resume(jthread thread);
+VMEXPORT IDATA jthread_resume_all(jvmtiError* results, jint count, const jthread* thread_list);
+VMEXPORT IDATA jthread_cancel_all();
 
 #ifdef __cplusplus
 }

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/thread_externals.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/thread_externals.h?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/thread_externals.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/thread_externals.h Mon Jul 16 12:32:35 2007
@@ -20,8 +20,9 @@
 
 #include "open/types.h"
 #include "open/hycomp.h"
-#include <jni.h>
+#include "jni.h"
 #include "jvmti_types.h"
+#include "open/hythread_ext.h"
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
@@ -33,7 +34,7 @@
  * @return The address of the memory chunk in the object which can be used by the 
  *         Thread Manager for synchronization purposes.
  */
-VMEXPORT void *vm_object_get_lockword_addr(jobject obj);
+VMEXPORT hythread_thin_monitor_t * vm_object_get_lockword_addr(jobject obj);
 
 /**
  * @return The size of the memory chunk in the object that can be used by
@@ -65,17 +66,15 @@
  * @return TM-specific data previously stored, or <code>NULL</code>,
  *         if there are none.
  */
-VMEXPORT void *vm_jthread_get_tm_data(jthread thread);
+VMEXPORT hythread_t vm_jthread_get_tm_data(jthread thread);
 
 /** 
  * Registrates current thread in VM, so it could execute Java.
  *
  * @param[in] java_vm    - current thread will be attached to the specified VM
  * @param[out] p_jni_env - will point to JNI environment assocciated with the thread
- * @param[in] vm_thread_dummies - memory preallocated for Java thread structures (if NULL, memory will be allocated automatically)
  */
-VMEXPORT jint vm_attach(JavaVM * java_vm, JNIEnv ** p_jni_env, 
-			void *vm_thread_dummies);
+VMEXPORT jint vm_attach(JavaVM * java_vm, JNIEnv ** p_jni_env);
 
 /**
  * Frees java related resources before thread exit.

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/ti_thread.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/ti_thread.h?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/ti_thread.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/ti_thread.h Mon Jul 16 12:32:35 2007
@@ -52,99 +52,91 @@
  */
 //@{
 
-IDATA jthread_get_state(jthread thread, jint *thread_state);
+VMEXPORT IDATA jthread_get_jvmti_state(jthread thread, jint *thread_state);
 
 //@}
 /** @name Instrumentation
  */
 //@{
 
-IDATA jthread_get_all_threads(jthread** threads, jint *count);
-IDATA jthread_get_deadlocked_threads(jthread* thread_list, jint thread_count, jthread** dead_list, jint *dead_count);
-IDATA jthread_get_thread_count(jint *count);
-IDATA jthread_get_blocked_count(jint* count);
-IDATA jthread_get_waited_count(jint* count);
-IDATA jthread_get_total_started_thread_count(jint* count);
-
-//@}
-/** @name Local storage
- */
-//@{
-
-IDATA jthread_set_local_storage(jthread thread, const void* data);
-IDATA jthread_get_local_storage(jthread thread, void** data_ptr);
+VMEXPORT IDATA jthread_get_all_threads(jthread** threads, jint *count);
+VMEXPORT IDATA jthread_get_deadlocked_threads(jthread* thread_list, jint thread_count, jthread** dead_list, jint *dead_count);
+VMEXPORT IDATA jthread_get_thread_count(jint *count);
+VMEXPORT IDATA jthread_get_blocked_count(jint* count);
+VMEXPORT IDATA jthread_get_waited_count(jint* count);
+VMEXPORT IDATA jthread_get_total_started_thread_count(jint* count);
 
 //@}
 /** @name Monitor info
  */
 //@{
 
-IDATA jthread_get_contended_monitor(jthread thread, jobject* monitor);
-IDATA jthread_get_wait_monitor(jthread thread, jobject* monitor);
-jboolean jthread_holds_lock(jthread thread, jobject monitor);
-IDATA jthread_get_lock_owner(jobject monitor, jthread* lock_owner);
-IDATA jthread_get_lock_recursion(jobject monitor, jthread lock_owner);
-IDATA jthread_get_owned_monitors(jthread thread, jint* mon_count_ptr, jobject** monitors);
-
-jboolean jthread_is_thread_contention_monitoring_enabled();
-jboolean jthread_is_thread_contention_monitoring_supported();
-void jthread_set_thread_contention_monitoring_enabled(jboolean flag);
+VMEXPORT IDATA jthread_get_contended_monitor(jthread thread, jobject* monitor);
+VMEXPORT IDATA jthread_get_wait_monitor(jthread thread, jobject* monitor);
+VMEXPORT jboolean jthread_holds_lock(jthread thread, jobject monitor);
+VMEXPORT IDATA jthread_get_lock_owner(jobject monitor, jthread* lock_owner);
+VMEXPORT IDATA jthread_get_lock_recursion(jobject monitor, jthread lock_owner);
+VMEXPORT IDATA jthread_get_owned_monitors(jthread thread, jint* mon_count_ptr, jobject** monitors);
+
+VMEXPORT jboolean jthread_is_thread_contention_monitoring_enabled();
+VMEXPORT jboolean jthread_is_thread_contention_monitoring_supported();
+VMEXPORT void jthread_set_thread_contention_monitoring_enabled(jboolean flag);
 
 //@}
 /** @name CPU timing
  */
 //@{
 
-IDATA jthread_get_thread_cpu_time(jthread thread, jlong *nanos_ptr);
-IDATA jthread_get_thread_user_cpu_time(jthread thread, jlong *nanos_ptr);
-IDATA jthread_get_thread_blocked_time(jthread thread, jlong *nanos_ptr);
-IDATA jthread_get_thread_waited_time(jthread thread, jlong *nanos_ptr);
-IDATA jthread_get_thread_cpu_timer_info(jvmtiTimerInfo* info_ptr);
-
-jlong jthread_get_thread_blocked_times_count(jthread java_thread);
-jlong jthread_get_thread_waited_times_count(jthread java_thread);
-
-jboolean jthread_is_current_thread_cpu_time_supported();
-jboolean jthread_is_thread_cpu_time_enabled();
-jboolean jthread_is_thread_cpu_time_supported();
+VMEXPORT IDATA jthread_get_thread_cpu_time(jthread thread, jlong *nanos_ptr);
+VMEXPORT IDATA jthread_get_thread_user_cpu_time(jthread thread, jlong *nanos_ptr);
+VMEXPORT IDATA jthread_get_thread_blocked_time(jthread thread, jlong *nanos_ptr);
+VMEXPORT IDATA jthread_get_thread_waited_time(jthread thread, jlong *nanos_ptr);
+VMEXPORT IDATA jthread_get_thread_cpu_timer_info(jvmtiTimerInfo* info_ptr);
+
+VMEXPORT jlong jthread_get_thread_blocked_times_count(jthread java_thread);
+VMEXPORT jlong jthread_get_thread_waited_times_count(jthread java_thread);
+
+VMEXPORT jboolean jthread_is_current_thread_cpu_time_supported();
+VMEXPORT jboolean jthread_is_thread_cpu_time_enabled();
+VMEXPORT jboolean jthread_is_thread_cpu_time_supported();
 
-void jthread_set_thread_cpu_time_enabled(jboolean flag);
+VMEXPORT void jthread_set_thread_cpu_time_enabled(jboolean flag);
 
 //@}
 /** @name Peak count
  */
 //@{
 
-IDATA jthread_reset_peak_thread_count();
-IDATA jthread_get_peak_thread_count(jint *threads_count_ptr);
+VMEXPORT IDATA jthread_reset_peak_thread_count();
+VMEXPORT IDATA jthread_get_peak_thread_count(jint *threads_count_ptr);
 
 //@}
 /** @name Raw monitors
  */
 //@{
 
-IDATA jthread_raw_monitor_create(jrawMonitorID *mon_ptr);
-IDATA jthread_raw_monitor_destroy(jrawMonitorID mon_ptr);
-IDATA jthread_raw_monitor_enter(jrawMonitorID mon_ptr);
-IDATA jthread_raw_monitor_try_enter(jrawMonitorID mon_ptr);
-IDATA jthread_raw_monitor_exit(jrawMonitorID mon_ptr);
-IDATA jthread_raw_monitor_notify(jrawMonitorID mon_ptr);
-IDATA jthread_raw_monitor_notify_all(jrawMonitorID mon_ptr);
-IDATA jthread_raw_monitor_wait(jrawMonitorID mon_ptr, I_64 millis);
+VMEXPORT IDATA jthread_raw_monitor_create(jrawMonitorID *mon_ptr);
+VMEXPORT IDATA jthread_raw_monitor_destroy(jrawMonitorID mon_ptr);
+VMEXPORT IDATA jthread_raw_monitor_enter(jrawMonitorID mon_ptr);
+VMEXPORT IDATA jthread_raw_monitor_try_enter(jrawMonitorID mon_ptr);
+VMEXPORT IDATA jthread_raw_monitor_exit(jrawMonitorID mon_ptr);
+VMEXPORT IDATA jthread_raw_monitor_notify(jrawMonitorID mon_ptr);
+VMEXPORT IDATA jthread_raw_monitor_notify_all(jrawMonitorID mon_ptr);
+VMEXPORT IDATA jthread_raw_monitor_wait(jrawMonitorID mon_ptr, I_64 millis);
 
 //@}
 
-JVMTILocalStorage* jthread_get_jvmti_local_storage(jthread java_thread);
+VMEXPORT JVMTILocalStorage* jthread_get_jvmti_local_storage(jthread java_thread);
 
 /** @name jthread iterators
  */
 //@{
 
-jthread_iterator_t jthread_iterator_create(void);
-jthread jthread_iterator_next(jthread_iterator_t *it);
-IDATA jthread_iterator_reset(jthread_iterator_t *it);
-IDATA jthread_iterator_size(jthread_iterator_t iterator);
-IDATA jthread_iterator_release(jthread_iterator_t *it);
+VMEXPORT jthread_iterator_t jthread_iterator_create(void);
+VMEXPORT jthread jthread_iterator_next(jthread_iterator_t *it);
+VMEXPORT IDATA jthread_iterator_reset(jthread_iterator_t *it);
+VMEXPORT IDATA jthread_iterator_size(jthread_iterator_t iterator);
+VMEXPORT IDATA jthread_iterator_release(jthread_iterator_t *it);
 
 //@}
 

Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_exports.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_exports.cpp?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_exports.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_exports.cpp Mon Jul 16 12:32:35 2007
@@ -66,21 +66,21 @@
 
 extern bool interpreter_st_get_frame(unsigned target_depth, StackTraceFrame* stf);
 extern jvmtiError interpreter_ti_getFrameLocation(
-        struct jvmtiEnv_struct *,class VM_thread *,int, struct _jmethodID * *,int64 *);
-extern jvmtiError interpreter_ti_getLocal32( struct jvmtiEnv_struct *,class VM_thread *,int,int,int *);
-extern jvmtiError interpreter_ti_getLocal64( struct jvmtiEnv_struct *,class VM_thread *,int,int,int64 *);
-extern jvmtiError interpreter_ti_getObject( struct jvmtiEnv_struct *,class VM_thread *,int,int,struct _jobject * *);
-extern jvmtiError interpreter_ti_getStackTrace(struct jvmtiEnv_struct *,class VM_thread *,int,int,jvmtiFrameInfo *,int *);
+        struct jvmtiEnv_struct *,struct VM_thread *,int, struct _jmethodID * *,int64 *);
+extern jvmtiError interpreter_ti_getLocal32( struct jvmtiEnv_struct *,struct VM_thread *,int,int,int *);
+extern jvmtiError interpreter_ti_getLocal64( struct jvmtiEnv_struct *,struct VM_thread *,int,int,int64 *);
+extern jvmtiError interpreter_ti_getObject( struct jvmtiEnv_struct *,struct VM_thread *,int,int,struct _jobject * *);
+extern jvmtiError interpreter_ti_getStackTrace(struct jvmtiEnv_struct *,struct VM_thread *,int,int,jvmtiFrameInfo *,int *);
 
-extern jvmtiError interpreter_ti_get_frame_count( struct jvmtiEnv_struct *,class VM_thread *,int *);
+extern jvmtiError interpreter_ti_get_frame_count( struct jvmtiEnv_struct *,struct VM_thread *,int *);
 extern jvmtiError interpreter_ti_notify_frame_pop (jvmtiEnv*, VM_thread *thread, int depth);
-extern jvmtiError interpreter_ti_setLocal32( struct jvmtiEnv_struct *,class VM_thread *,int,int,int);
-extern jvmtiError interpreter_ti_setLocal64( struct jvmtiEnv_struct *,class VM_thread *,int,int,int64);
-extern jvmtiError interpreter_ti_setObject( struct jvmtiEnv_struct *,class VM_thread *,int,int,struct _jobject *);
+extern jvmtiError interpreter_ti_setLocal32( struct jvmtiEnv_struct *,struct VM_thread *,int,int,int);
+extern jvmtiError interpreter_ti_setLocal64( struct jvmtiEnv_struct *,struct VM_thread *,int,int,int64);
+extern jvmtiError interpreter_ti_setObject( struct jvmtiEnv_struct *,struct VM_thread *,int,int,struct _jobject *);
 
-extern unsigned int interpreter_st_get_interrupted_method_native_bit(class VM_thread *);
-extern void interpreter_enumerate_thread(class VM_thread *);
-extern void interpreter_ti_enumerate_thread(jvmtiEnv*, class VM_thread*);
+extern unsigned int interpreter_st_get_interrupted_method_native_bit(struct VM_thread *);
+extern void interpreter_enumerate_thread(struct VM_thread *);
+extern void interpreter_ti_enumerate_thread(jvmtiEnv*, struct VM_thread*);
 extern void interpreter_st_get_interrupted_method(struct Method * *,int64 *);
 extern void interpreter_st_get_catch_method(struct Method * *,int64 *,struct _jobject *);
 extern void interpreter_st_get_trace(VM_thread *thread, unsigned int *,struct StackTraceFrame * *);
@@ -93,7 +93,7 @@
 extern jvmtiError interpreter_ti_pop_frame(jvmtiEnv*, VM_thread *thread);
 extern void stack_dump(int fd, VM_thread *thread);
 
-extern FrameHandle* interpreter_get_last_frame(class VM_thread *thread);
+extern FrameHandle* interpreter_get_last_frame(struct VM_thread *thread);
 extern FrameHandle* interpreter_get_prev_frame(FrameHandle* frame);
 extern Method_Handle interpreter_get_frame_method(FrameHandle* frame);
 extern uint8* interpreter_get_frame_bytecode_ptr(FrameHandle* frame);

Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp Mon Jul 16 12:32:35 2007
@@ -2579,7 +2579,7 @@
     assert(frame.method->is_static() || frame.This);
     
     M2N_ALLOC_MACRO;
-    if (get_thread_ptr()->p_exception_object_ti || exn_raised()) {
+    if (get_thread_ptr()->jvmti_thread.p_exception_object_ti || exn_raised()) {
          frame.exc = get_current_thread_exception();
          goto got_exception;
     }
@@ -2664,7 +2664,7 @@
             }
             breakpoint_processed = false;
 
-            if (get_thread_ptr()->p_exception_object_ti || exn_raised()) {
+            if (get_thread_ptr()->jvmti_thread.p_exception_object_ti || exn_raised()) {
                 frame.exc = get_current_thread_exception();
                 goto got_exception;
             }
@@ -3046,8 +3046,9 @@
         clear_current_thread_exception();
 
         if (interpreter_ti_notification_mode) {
-            frame.exc_catch = (ManagedObject*) get_thread_ptr()->p_exception_object_ti;
-            p_TLS_vmthread->p_exception_object_ti = NULL;
+            frame.exc_catch =
+                (ManagedObject*) get_thread_ptr()->jvmti_thread.p_exception_object_ti;
+            p_TLS_vmthread->jvmti_thread.p_exception_object_ti = NULL;
 
             if (frame.exc != frame.exc_catch) {
 
@@ -3079,7 +3080,8 @@
                 M2N_FREE_MACRO;
                 assert(!exn_raised());
                 if (interpreter_ti_notification_mode)
-                    p_TLS_vmthread->p_exception_object_ti = (volatile ManagedObject*) frame.exc;
+                    p_TLS_vmthread->jvmti_thread.p_exception_object_ti =
+                        (volatile ManagedObject*) frame.exc;
             }
         }
 

Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter_ti.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter_ti.cpp?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter_ti.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter_ti.cpp Mon Jul 16 12:32:35 2007
@@ -394,7 +394,7 @@
     else interpreter_ti_notification_mode &= ~new_mask;
 
     if (!interpreter_ti_notification_mode)
-        get_thread_ptr()->p_exception_object_ti = NULL;
+        get_thread_ptr()->jvmti_thread.p_exception_object_ti = NULL;
 }
 
 void method_entry_callback(Method *method) {
@@ -506,7 +506,7 @@
 
 ////////////////////////////////////////
 //  Interpreter frames iteration
-FrameHandle* interpreter_get_last_frame(class VM_thread *thread)
+FrameHandle* interpreter_get_last_frame(struct VM_thread *thread)
 {
     return (FrameHandle*)getLastStackFrame(thread);
 }

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/m2n_em64t.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/m2n_em64t.cpp?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/m2n_em64t.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/m2n_em64t.cpp Mon Jul 16 12:32:35 2007
@@ -42,11 +42,11 @@
 }
 
 M2nFrame* m2n_get_last_frame() {
-    return p_TLS_vmthread->last_m2n_frame;
+    return (M2nFrame*)p_TLS_vmthread->last_m2n_frame;
 }
 
 M2nFrame* m2n_get_last_frame(VM_thread * thread) {
-    return thread->last_m2n_frame;
+    return (M2nFrame*)thread->last_m2n_frame;
 }
 
 void m2n_set_last_frame(VM_thread* thread, M2nFrame * lm2nf) {

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/lil/ia32/pim/m2n_ia32.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/lil/ia32/pim/m2n_ia32.cpp?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/lil/ia32/pim/m2n_ia32.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/lil/ia32/pim/m2n_ia32.cpp Mon Jul 16 12:32:35 2007
@@ -45,13 +45,13 @@
 VMEXPORT // temporary solution for interpreter unplug
 M2nFrame* m2n_get_last_frame()
 {
-    return p_TLS_vmthread->last_m2n_frame;
+    return (M2nFrame*)p_TLS_vmthread->last_m2n_frame;
 }
 
 VMEXPORT // temporary solution for interpreter unplug
 M2nFrame* m2n_get_last_frame(VM_thread* thread)
 {
-    return thread->last_m2n_frame;
+    return (M2nFrame*)thread->last_m2n_frame;
 }
 
 VMEXPORT // temporary solution for interpreter unplug

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/lil/ipf/pim/m2n_ipf.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/lil/ipf/pim/m2n_ipf.cpp?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/lil/ipf/pim/m2n_ipf.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/lil/ipf/pim/m2n_ipf.cpp Mon Jul 16 12:32:35 2007
@@ -90,13 +90,13 @@
 VMEXPORT // temporary solution for interpreter unplug
 M2nFrame* m2n_get_last_frame()
 {
-    return p_TLS_vmthread->last_m2n_frame;
+    return (M2nFrame*)p_TLS_vmthread->last_m2n_frame;
 }
 
 VMEXPORT // temporary solution for interpreter unplug
 M2nFrame* m2n_get_last_frame(VM_thread* thread)
 {
-    return thread->last_m2n_frame;
+    return (M2nFrame*)thread->last_m2n_frame;
 }
 
 VMEXPORT // temporary solution for interpreter unplug

Modified: harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_basic.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_basic.c?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_basic.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_basic.c Mon Jul 16 12:32:35 2007
@@ -20,7 +20,7 @@
 #include "thread_unit_test_utils.h"
 #include <open/jthread.h>
 #include <open/hythread_ext.h>
-#include "thread_private.h"
+#include "thread_manager.h"
 
 /*
  * Time for jthread_timed_join() to wait
@@ -47,7 +47,7 @@
         }
     }
 
-    status = vm_attach(GLOBAL_VM, &jni_env, NULL);
+    status = vm_attach(GLOBAL_VM, &jni_env);
     if (status != JNI_OK) {
         tts->phase = TT_PHASE_ERROR;
         return 0;
@@ -303,7 +303,7 @@
     tested_thread_sturct_t * tts;
     jobject excn;
     hythread_t hythread;
-    jvmti_thread_t jvmti_thread;
+    vm_thread_t vm_thread;
     JNIEnv * jni_env;
 
     jni_env = jthread_get_JNI_env(jthread_self());
@@ -317,8 +317,10 @@
         tf_assert_same(jthread_exception_stop(tts->java_thread, excn), TM_ERROR_NONE);
         check_tested_thread_phase(tts, TT_PHASE_ANY);
         hythread = vm_jthread_get_tm_data(tts->java_thread);
-        jvmti_thread = hythread_get_private_data(hythread);
-        tf_assert(vm_objects_are_equal(excn, jvmti_thread->stop_exception));
+        tf_assert(hythread);
+        vm_thread = (vm_thread_t)hythread_tls_get(hythread, TM_THREAD_VM_TLS_KEY);
+        tf_assert(vm_thread);
+        tf_assert(vm_objects_are_equal(excn, vm_thread->stop_exception));
     }
 
     // Terminate all threads (not needed here) and clear tts structures
@@ -335,12 +337,19 @@
 
     tested_thread_sturct_t * tts;
     JNIEnv * env;
-    jclass excn;
+    jclass excn_stop_class;
+    jclass stop_excn_class;
     hythread_t hythread;
-    jvmti_thread_t jvmti_thread;
+    vm_thread_t vm_thread;
+    jmethodID getClassId;
 
     env = jthread_get_JNI_env(jthread_self());
-    excn = (*env) -> FindClass(env, "java/lang/ThreadDeath");
+    excn_stop_class = (*env) -> FindClass(env, "java/lang/ThreadDeath");
+    tf_assert(excn_stop_class);
+
+    getClassId = (*env)->GetMethodID(env, excn_stop_class,
+        "getClass", "()Ljava/lang/Class;");
+    tf_assert(getClassId);
 
     // Initialize tts structures and run all tested threads
     tested_threads_run(run_for_test_jthread_exception_stop);
@@ -349,14 +358,17 @@
     while(next_tested_thread(&tts)){
         tf_assert_same(tts->excn, NULL);
         tf_assert_same(jthread_stop(tts->java_thread), TM_ERROR_NONE);
-        //check_tested_thread_phase(tts, TT_PHASE_ANY);
-        //tf_assert_same(tts->excn, excn);
+
         hythread = vm_jthread_get_tm_data(tts->java_thread);
-        jvmti_thread = hythread_get_private_data(hythread);
-        //tf_assert_same(excn, jvmti_thread->stop_exception);
+        tf_assert(hythread);
+        vm_thread =
+            (vm_thread_t)hythread_tls_get(hythread, TM_THREAD_VM_TLS_KEY);
+        tf_assert(vm_thread);
+        stop_excn_class = (*env)->CallObjectMethod(env,
+            vm_thread->stop_exception, getClassId);
+        tf_assert(stop_excn_class);
 
-        //tf_assert_same(jthread_stop(tts->java_thread), TM_ERROR_NONE);
-        //tf_assert_same(thread_deaf_excn, thread->stop_exception);
+        tf_assert(vm_objects_are_equal(excn_stop_class, stop_excn_class));
     }
 
     // Terminate all threads (not needed here) and clear tts structures
@@ -476,7 +488,7 @@
     TEST(test_jthread_join)
     TEST(test_jthread_timed_join)
     TEST(test_jthread_exception_stop)
-    //TEST(test_jthread_stop)
+    TEST(test_jthread_stop)
     TEST(test_jthread_sleep)
     TEST(test_hythread_yield)
 TEST_LIST_END;

Modified: harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_identify.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_identify.c?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_identify.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_identify.c Mon Jul 16 12:32:35 2007
@@ -20,7 +20,7 @@
 #include "thread_unit_test_utils.h"
 #include <open/jthread.h>
 #include <open/hythread_ext.h>
-#include "thread_private.h"
+#include "thread_manager.h"
 
 
 /*

Modified: harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_ptr_conv.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_ptr_conv.c?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_ptr_conv.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_ptr_conv.c Mon Jul 16 12:32:35 2007
@@ -20,7 +20,7 @@
 #include "thread_unit_test_utils.h"
 #include <open/jthread.h>
 #include <open/hythread_ext.h>
-#include "thread_private.h"
+#include "thread_manager.h"
 
 
 /*

Modified: harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_basic.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_basic.c?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_basic.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_basic.c Mon Jul 16 12:32:35 2007
@@ -16,12 +16,11 @@
  */
 
 #include <stdio.h>
-#include "thread_private.h"
 #include <apr_pools.h>
 #include <apr_time.h>
-#include "testframe.h"
-#include "jthread.h"
 #include <open/hythread_ext.h>
+#include "testframe.h"
+#include "thread_manager.h"
 
 int start_proc(void *);
 int start_proc_empty(void *);
@@ -223,15 +222,15 @@
     //1.group
     ////
     tf_assert(group);
-    tf_assert(group->threads_count == 0);
+    //tf_assert(group->threads_count == 0);
 
     return 0;
 }
 
 int start_proc(void *args) {
     void** attrs = (void **)args; 
-    tf_assert_same(hythread_self()->priority, ((jthread_threadattr_t *)attrs[1])->priority);
-    tf_assert_same(hythread_self()->group, attrs[0]);
+    tf_assert_same(hythread_get_priority(hythread_self()), ((jthread_threadattr_t *)attrs[1])->priority);
+    tf_assert_same(((HyThread_public*)hythread_self())->group, attrs[0]);
     return 0;
 }
 

Modified: harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_fat_monitor.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_fat_monitor.c?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_fat_monitor.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_fat_monitor.c Mon Jul 16 12:32:35 2007
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-#include "thread_private.h"
+#include "thread_manager.h"
 #include "testframe.h"
 #include "open/jthread.h"
 #include <open/hythread_ext.h>

Modified: harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_suspend.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_suspend.c?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_suspend.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_suspend.c Mon Jul 16 12:32:35 2007
@@ -16,12 +16,11 @@
  */
 
 #include <stdio.h>
-#include "thread_private.h"
 #include <apr_pools.h>
 #include <apr_atomic.h>
-#include "testframe.h"
 #include <open/hythread_ext.h>
-#include "open/jthread.h"
+#include "testframe.h"
+#include "thread_manager.h"
 
 int start_proc(void *);
 
@@ -91,7 +90,7 @@
         hythread_create(&thread, 0, 0, 0, start_proc, args);
     } 
     hythread_sleep(500); 
-    hythread_suspend_all(NULL, hythread_self()->group);
+    hythread_suspend_all(NULL, ((HyThread_public*)hythread_self())->group);
     hythread_suspend_disable();
     status = hythread_thin_monitor_enter(lockword_ptr);
     tf_assert_same(status, TM_ERROR_NONE);
@@ -107,7 +106,7 @@
         tf_assert_same(args[1], 0);
     }
     
-    hythread_resume_all(hythread_self()->group);
+    hythread_resume_all(((HyThread_public*)hythread_self())->group);
     
     hythread_join(thread);
     

Modified: harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_thin_monitor.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_thin_monitor.c?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_thin_monitor.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_thin_monitor.c Mon Jul 16 12:32:35 2007
@@ -16,11 +16,9 @@
  */
 
 #include <stdio.h>
-#include "thread_private.h"
 #include <apr_pools.h>
 #include <apr_atomic.h>
 #include "testframe.h"
-#include "jthread.h"
 #include <open/hythread_ext.h>
 
 int start_proc(void *);

Modified: harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_instrum.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_instrum.c?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_instrum.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_instrum.c Mon Jul 16 12:32:35 2007
@@ -35,10 +35,8 @@
     jint initial_thread_count;
     jint initial_all_threads_count;
     jthread *threads = NULL;
-    JNIEnv * jni_env;
     int i;
-
-    jni_env = jthread_get_JNI_env(jthread_self());
+    JNIEnv * jni_env = jthread_get_JNI_env(jthread_self());
 
     // TODO: unsafe .... need to find another way of synchronization
     hythread_sleep(1000);
@@ -57,7 +55,9 @@
     i = 0;
     reset_tested_thread_iterator(&tts);
     while(next_tested_thread(&tts)){
-        tf_assert_same(jthread_create_with_function(jni_env, tts->java_thread, &tts->attrs, default_run_for_test, tts), TM_ERROR_NONE);
+        tts->attrs.proc = default_run_for_test;
+        tts->attrs.arg = tts;
+        tf_assert_same(jthread_create_with_function(jni_env, tts->java_thread, &tts->attrs), TM_ERROR_NONE);
         tested_thread_wait_started(tts);
         tts->native_thread = (hythread_t) vm_jthread_get_tm_data(tts->java_thread);
         check_tested_thread_phase(tts, TT_PHASE_RUNNING);

Modified: harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_local_storage.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_local_storage.c?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_local_storage.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_local_storage.c Mon Jul 16 12:32:35 2007
@@ -15,29 +15,36 @@
  *  limitations under the License.
  */
 
+#include "open/ti_thread.h"
 #include "testframe.h"
 #include "thread_unit_test_utils.h"
-#include <open/ti_thread.h>
+
+#define TEST_TLS_KEY (TM_THREAD_VM_TLS_KEY + 1)
 
 /*
- * Test jthread_set_local_storage(...)
+ * Test test_jthread_set_and_get_local_storage
  */
-int test_jthread_set_local_storage(void) {
-
-
-    tested_thread_sturct_t *tts;
+int test_jthread_set_and_get_local_storage(void)
+{
     void * data;
+    hythread_t hythread;
+    tested_thread_sturct_t *tts;
 
     // Initialize tts structures and run all tested threads
     tested_threads_run(default_run_for_test);
     
     reset_tested_thread_iterator(&tts);
-    while(next_tested_thread(&tts)){
-        tf_assert_same(jthread_set_local_storage(tts->java_thread, (const void*)tts), TM_ERROR_NONE);
+    while (next_tested_thread(&tts)) {
+        hythread = vm_jthread_get_tm_data(tts->java_thread);
+        tf_assert(hythread);
+        tf_assert_same(hythread_tls_set(hythread, TEST_TLS_KEY, tts),
+                       TM_ERROR_NONE);
     }
     reset_tested_thread_iterator(&tts);
-    while(next_tested_thread(&tts)){
-        tf_assert_same(jthread_get_local_storage(tts->java_thread, &data), TM_ERROR_NONE);
+    while (next_tested_thread(&tts)) {
+        hythread = vm_jthread_get_tm_data(tts->java_thread);
+        tf_assert(hythread);
+        data = hythread_tls_get(hythread, TEST_TLS_KEY);
         tf_assert_same(data, tts);
     }
 
@@ -47,15 +54,6 @@
     return TEST_PASSED;
 }
 
-/*
- * Test jthread_get_local_storage(...)
- */
-int test_jthread_get_local_storage(void) {
-
-    return test_jthread_set_local_storage();
-}
-
 TEST_LIST_START
-    //TEST(test_jthread_set_local_storage)
-    //TEST(test_jthread_get_local_storage)
+    TEST(test_jthread_set_and_get_local_storage)
 TEST_LIST_END;

Modified: harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_monitor_info.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_monitor_info.c?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_monitor_info.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_monitor_info.c Mon Jul 16 12:32:35 2007
@@ -25,10 +25,6 @@
 
 hysem_t mon_enter;
 
-int ti_is_enabled() {
-    return 1;
-}
-
 /*
  * Test jthread_get_contended_monitor(...)
  */

Modified: harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_state.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_state.c?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_state.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_state.c Mon Jul 16 12:32:35 2007
@@ -24,7 +24,7 @@
 #include <open/ti_thread.h>
 
 /*
- * Test jthread_get_state(...)
+ * Test jthread_get_jvmti_state(...)
  *
  *  called function          tested state
  *
@@ -34,7 +34,7 @@
  *  jthread_clear_interrupted()  ALIVE | RUNNABLE
  *                           DEAD
  */
-void JNICALL run_for_test_jthread_get_state_1(jvmtiEnv * jvmti_env, JNIEnv * jni_env, void *args){
+void JNICALL run_for_test_jthread_get_jvmti_state_1(jvmtiEnv * jvmti_env, JNIEnv * jni_env, void *args){
 
     tested_thread_sturct_t * tts = (tested_thread_sturct_t *) args;
 
@@ -48,7 +48,7 @@
     tested_thread_ended(tts);
 }
 
-int test_jthread_get_state_1(void) {
+int test_jthread_get_jvmti_state_1(void) {
 
     tested_thread_sturct_t *tts;
     int state;
@@ -59,7 +59,7 @@
 
     reset_tested_thread_iterator(&tts);
     while(next_tested_thread(&tts)){
-        tf_assert_same(jthread_get_state(tts->java_thread, &state), TM_ERROR_NONE);
+        tf_assert_same(jthread_get_jvmti_state(tts->java_thread, &state), TM_ERROR_NONE);
         ref_state = 0;
         if(tts->my_index == 0){
             printf("state = %08x (%08x)\n", state, ref_state);
@@ -68,12 +68,12 @@
     }
 
     // Run all tested threads
-    tested_threads_run_common(run_for_test_jthread_get_state_1);
+    tested_threads_run_common(run_for_test_jthread_get_jvmti_state_1);
 
     reset_tested_thread_iterator(&tts);
     while(next_tested_thread(&tts)){
         tested_thread_wait_running(tts);
-        tf_assert_same(jthread_get_state(tts->java_thread, &state), TM_ERROR_NONE);
+        tf_assert_same(jthread_get_jvmti_state(tts->java_thread, &state), TM_ERROR_NONE);
         ref_state = 0x5;
         if(tts->my_index == 0){
             printf("state = %08x (%08x)\n", state, ref_state);
@@ -81,7 +81,7 @@
         //tf_assert_same(state, ref_state);
 
         tf_assert_same(jthread_interrupt(tts->java_thread), TM_ERROR_NONE);
-        tf_assert_same(jthread_get_state(tts->java_thread, &state), TM_ERROR_NONE);
+        tf_assert_same(jthread_get_jvmti_state(tts->java_thread, &state), TM_ERROR_NONE);
         ref_state = 0x200005;
         if(tts->my_index == 0){
             printf("state = %08x (%08x)\n", state, ref_state);
@@ -89,7 +89,7 @@
         //tf_assert_same(state, ref_state);
 
         tf_assert_same(jthread_clear_interrupted(tts->java_thread), TM_ERROR_INTERRUPT);
-        tf_assert_same(jthread_get_state(tts->java_thread, &state), TM_ERROR_NONE);
+        tf_assert_same(jthread_get_jvmti_state(tts->java_thread, &state), TM_ERROR_NONE);
         ref_state = 0x5;
         if(tts->my_index == 0){
             printf("state = %08x (%08x)\n", state, ref_state);
@@ -99,7 +99,7 @@
         tested_thread_send_stop_request(tts);
         tested_thread_wait_ended(tts);
         check_tested_thread_phase(tts, TT_PHASE_DEAD);
-        tf_assert_same(jthread_get_state(tts->java_thread, &state), TM_ERROR_NONE);
+        tf_assert_same(jthread_get_jvmti_state(tts->java_thread, &state), TM_ERROR_NONE);
         ref_state = 0x2;
         if(tts->my_index == 0){
             printf("state = %08x (%08x)\n", state, ref_state);
@@ -113,9 +113,9 @@
     return TEST_PASSED;
 }
 /*
- * Test jthread_get_state(...)
+ * Test jthread_get_jvmti_state(...)
  */
-void JNICALL run_for_test_jthread_get_state_2(jvmtiEnv * jvmti_env, JNIEnv * jni_env, void *args){
+void JNICALL run_for_test_jthread_get_jvmti_state_2(jvmtiEnv * jvmti_env, JNIEnv * jni_env, void *args){
 
     tested_thread_sturct_t * tts = (tested_thread_sturct_t *) args;
     jobject monitor = tts->monitor;
@@ -147,7 +147,7 @@
     tested_thread_ended(tts);
 }
 
-int test_jthread_get_state_2(void) {
+int test_jthread_get_jvmti_state_2(void) {
 
     tested_thread_sturct_t *tts;
     jobject monitor;
@@ -165,12 +165,12 @@
     status = jthread_monitor_enter(monitor);
 
     // Run all tested threads
-    tested_threads_run_common(run_for_test_jthread_get_state_2);
+    tested_threads_run_common(run_for_test_jthread_get_jvmti_state_2);
 
     reset_tested_thread_iterator(&tts);
     while(next_tested_thread(&tts)){
         check_tested_thread_phase(tts, TT_PHASE_WAITING_ON_MONITOR);
-        tf_assert_same(jthread_get_state(tts->java_thread, &state), TM_ERROR_NONE);
+        tf_assert_same(jthread_get_jvmti_state(tts->java_thread, &state), TM_ERROR_NONE);
         ref_state = 0x401;
         if(tts->my_index == 0){
             printf("state = %08x (%08x)\n", state, ref_state);
@@ -183,7 +183,7 @@
     reset_tested_thread_iterator(&tts);
     while(next_tested_thread(&tts)){
         check_tested_thread_phase(tts, TT_PHASE_WAITING_ON_WAIT);
-        tf_assert_same(jthread_get_state(tts->java_thread, &state), TM_ERROR_NONE);
+        tf_assert_same(jthread_get_jvmti_state(tts->java_thread, &state), TM_ERROR_NONE);
         ref_state = 0x191;
         if(tts->my_index == 0){
             printf("state = %08x (%08x)\n", state, ref_state);
@@ -198,7 +198,7 @@
     reset_tested_thread_iterator(&tts);
     while(next_tested_thread(&tts)){
         check_tested_thread_phase(tts, TT_PHASE_WAITING_ON_WAIT);
-        tf_assert_same(jthread_get_state(tts->java_thread, &state), TM_ERROR_NONE);
+        tf_assert_same(jthread_get_jvmti_state(tts->java_thread, &state), TM_ERROR_NONE);
         ref_state = 0x401;
         if(tts->my_index == 0){
             printf("state = %08x (%08x)\n", state, ref_state);
@@ -212,7 +212,7 @@
     reset_tested_thread_iterator(&tts);
     while(next_tested_thread(&tts)){
         check_tested_thread_phase(tts, TT_PHASE_RUNNING);
-        tf_assert_same(jthread_get_state(tts->java_thread, &state), TM_ERROR_NONE);
+        tf_assert_same(jthread_get_jvmti_state(tts->java_thread, &state), TM_ERROR_NONE);
         ref_state = 0x5;
         if(tts->my_index == 0){
             printf("state = %08x (%08x)\n", state, ref_state);
@@ -227,9 +227,9 @@
 }
 
 /*
- * Test jthread_get_state(...)
+ * Test jthread_get_jvmti_state(...)
  */
-void JNICALL run_for_test_jthread_get_state_3(jvmtiEnv * jvmti_env, JNIEnv * jni_env, void *args){
+void JNICALL run_for_test_jthread_get_jvmti_state_3(jvmtiEnv * jvmti_env, JNIEnv * jni_env, void *args){
 
     tested_thread_sturct_t * tts = (tested_thread_sturct_t *) args;
     jobject monitor = tts->monitor;
@@ -257,25 +257,25 @@
     tested_thread_ended(tts);
 }
 
-int test_jthread_get_state_3(void) {
+int test_jthread_get_jvmti_state_3(void) {
 
     tested_thread_sturct_t *tts;
     int state;
     int ref_state;
 
     // Initialize tts structures and run all tested threads
-    tested_threads_run(run_for_test_jthread_get_state_3);
+    tested_threads_run(run_for_test_jthread_get_jvmti_state_3);
 
     reset_tested_thread_iterator(&tts);
     while(next_tested_thread(&tts)){
         check_tested_thread_phase(tts, TT_PHASE_WAITING_ON_WAIT);
-        tf_assert_same(jthread_get_state(tts->java_thread, &state), TM_ERROR_NONE);
+        tf_assert_same(jthread_get_jvmti_state(tts->java_thread, &state), TM_ERROR_NONE);
         ref_state = 0x1a1;
         printf("state = %08x (%08x)\n", state, ref_state);
         //tf_assert_same(state, ref_state);
         tf_assert_same(jthread_interrupt(tts->java_thread), TM_ERROR_NONE);
         check_tested_thread_phase(tts, TT_PHASE_DEAD);
-        tf_assert_same(jthread_get_state(tts->java_thread, &state), TM_ERROR_NONE);
+        tf_assert_same(jthread_get_jvmti_state(tts->java_thread, &state), TM_ERROR_NONE);
         ref_state = 0x2;
         printf("state = %08x (%08x)\n", state, ref_state);
         //tf_assert_same(state, ref_state);
@@ -288,9 +288,9 @@
 }
 
 /*
- * Test jthread_get_state(...)
+ * Test jthread_get_jvmti_state(...)
  */
-void JNICALL run_for_test_jthread_get_state_4(jvmtiEnv * jvmti_env, JNIEnv * jni_env, void *args){
+void JNICALL run_for_test_jthread_get_jvmti_state_4(jvmtiEnv * jvmti_env, JNIEnv * jni_env, void *args){
 
     tested_thread_sturct_t * tts = (tested_thread_sturct_t *) args;
     jobject monitor = tts->monitor;
@@ -318,14 +318,14 @@
     tested_thread_ended(tts);
 }
 
-int test_jthread_get_state_4(void) {
+int test_jthread_get_jvmti_state_4(void) {
 
     tested_thread_sturct_t *tts;
     int state;
     int ref_state;
 
     // Initialize tts structures and run all tested threads
-    tested_threads_run(run_for_test_jthread_get_state_4);
+    tested_threads_run(run_for_test_jthread_get_jvmti_state_4);
 
     // Wait for all threads wait timeout
     jthread_sleep(20 * CLICK_TIME_MSEC * MAX_TESTED_THREAD_NUMBER, 0);
@@ -333,7 +333,7 @@
     reset_tested_thread_iterator(&tts);
     while(next_tested_thread(&tts)){
         check_tested_thread_phase(tts, TT_PHASE_DEAD);
-        tf_assert_same(jthread_get_state(tts->java_thread, &state), TM_ERROR_NONE);
+        tf_assert_same(jthread_get_jvmti_state(tts->java_thread, &state), TM_ERROR_NONE);
         ref_state = 0x2;
         printf("state = %08x (%08x)\n", state, ref_state);
         //tf_assert_same(state, ref_state);
@@ -346,9 +346,9 @@
 }
 
 /*
- * Test jthread_get_state(...)
+ * Test jthread_get_jvmti_state(...)
  */
-void JNICALL run_for_test_jthread_get_state_5(jvmtiEnv * jvmti_env, JNIEnv * jni_env, void *args){
+void JNICALL run_for_test_jthread_get_jvmti_state_5(jvmtiEnv * jvmti_env, JNIEnv * jni_env, void *args){
 
     tested_thread_sturct_t * tts = (tested_thread_sturct_t *) args;
     IDATA status;
@@ -360,25 +360,25 @@
     tested_thread_ended(tts);
 }
 
-int test_jthread_get_state_5(void) {
+int test_jthread_get_jvmti_state_5(void) {
 
     tested_thread_sturct_t *tts;
     int state;
     int ref_state;
 
     // Initialize tts structures and run all tested threads
-    tested_threads_run(run_for_test_jthread_get_state_5);
+    tested_threads_run(run_for_test_jthread_get_jvmti_state_5);
 
     reset_tested_thread_iterator(&tts);
     while(next_tested_thread(&tts)){
         check_tested_thread_phase(tts, TT_PHASE_SLEEPING);
-        tf_assert_same(jthread_get_state(tts->java_thread, &state), TM_ERROR_NONE);
+        tf_assert_same(jthread_get_jvmti_state(tts->java_thread, &state), TM_ERROR_NONE);
         ref_state = 0;
         printf("state = %08x (%08x)\n", state, ref_state);
         //tf_assert_same(state, ref_state);
         tf_assert_same(jthread_interrupt(tts->java_thread), TM_ERROR_NONE);
         check_tested_thread_phase(tts, TT_PHASE_DEAD);
-        tf_assert_same(jthread_get_state(tts->java_thread, &state), TM_ERROR_NONE);
+        tf_assert_same(jthread_get_jvmti_state(tts->java_thread, &state), TM_ERROR_NONE);
         ref_state = 0;
         printf("state = %08x (%08x)\n", state, ref_state);
         //tf_assert_same(state, ref_state);
@@ -391,9 +391,9 @@
 }
 
 /*
- * Test jthread_get_state(...)
+ * Test jthread_get_jvmti_state(...)
  */
-void JNICALL run_for_test_jthread_get_state_6(jvmtiEnv * jvmti_env, JNIEnv * jni_env, void *args){
+void JNICALL run_for_test_jthread_get_jvmti_state_6(jvmtiEnv * jvmti_env, JNIEnv * jni_env, void *args){
 
     tested_thread_sturct_t * tts = (tested_thread_sturct_t *) args;
     IDATA status;
@@ -405,14 +405,14 @@
     tested_thread_ended(tts);
 }
 
-int test_jthread_get_state_6(void) {
+int test_jthread_get_jvmti_state_6(void) {
 
     tested_thread_sturct_t *tts;
     int state;
     int ref_state;
 
     // Initialize tts structures and run all tested threads
-    tested_threads_run(run_for_test_jthread_get_state_6);
+    tested_threads_run(run_for_test_jthread_get_jvmti_state_6);
 
     // Wait for all threads wait timeout
     jthread_sleep(20 * CLICK_TIME_MSEC * MAX_TESTED_THREAD_NUMBER, 0);
@@ -420,7 +420,7 @@
     reset_tested_thread_iterator(&tts);
     while(next_tested_thread(&tts)){
         check_tested_thread_phase(tts, TT_PHASE_DEAD);
-        tf_assert_same(jthread_get_state(tts->java_thread, &state), TM_ERROR_NONE);
+        tf_assert_same(jthread_get_jvmti_state(tts->java_thread, &state), TM_ERROR_NONE);
         ref_state = 0x2;
         printf("state = %08x (%08x)\n", state, ref_state);
         //tf_assert_same(state, ref_state);
@@ -433,10 +433,10 @@
 }
 
 TEST_LIST_START
-    //TEST(test_jthread_get_state_1)
-    //TEST(test_jthread_get_state_2)
-    //TEST(test_jthread_get_state_3)
-    //TEST(test_jthread_get_state_4)
-    //TEST(test_jthread_get_state_5)
-    TEST(test_jthread_get_state_6)
+    //TEST(test_jthread_get_jvmti_state_1)
+    //TEST(test_jthread_get_jvmti_state_2)
+    //TEST(test_jthread_get_jvmti_state_3)
+    //TEST(test_jthread_get_jvmti_state_4)
+    //TEST(test_jthread_get_jvmti_state_5)
+    TEST(test_jthread_get_jvmti_state_6)
 TEST_LIST_END;

Modified: harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/utils/thread_unit_test_utils.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/utils/thread_unit_test_utils.c?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/utils/thread_unit_test_utils.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/utils/thread_unit_test_utils.c Mon Jul 16 12:32:35 2007
@@ -154,7 +154,6 @@
         tts->my_index = i;
         tts->java_thread = new_jobject_thread(jni_env);
         tts->native_thread = NULL;
-        //tts->attrs.priority = 5;
         tts->jvmti_start_proc_arg = &tts->jvmti_start_proc_arg;
         hysem_create(&tts->started, 0, 1);
         hysem_create(&tts->running, 0, 1);
@@ -237,13 +236,13 @@
 
 void tested_threads_run_common(jvmtiStartFunction run_method_param){
     tested_thread_sturct_t *tts;
-    JNIEnv * jni_env;
-
-    jni_env = jthread_get_JNI_env(jthread_self());
+    JNIEnv * jni_env = jthread_get_JNI_env(jthread_self());
 
     reset_tested_thread_iterator(&tts);
     while(next_tested_thread(&tts)){
-        tf_assert_same_v(jthread_create_with_function(jni_env, tts->java_thread, &tts->attrs, run_method_param, tts), TM_ERROR_NONE);
+        tts->attrs.proc = run_method_param;
+        tts->attrs.arg = tts;
+        tf_assert_same_v(jthread_create_with_function(jni_env, tts->java_thread, &tts->attrs), TM_ERROR_NONE);
         tested_thread_wait_started(tts);
         tts->native_thread = (hythread_t) vm_jthread_get_tm_data(tts->java_thread);
     }
@@ -338,22 +337,16 @@
 int check_structure(tested_thread_sturct_t *tts){
 
     jthread java_thread = tts->java_thread;
+    vm_thread_t vm_thread;
     jvmti_thread_t jvmti_thread;
     hythread_t hythread;
 
     hythread = (hythread_t) vm_jthread_get_tm_data(java_thread);
     tf_assert_same(hythread, tts->native_thread);
-    jvmti_thread = hythread_get_private_data(hythread);
+    vm_thread = (vm_thread_t)hythread_tls_get(hythread, TM_THREAD_VM_TLS_KEY);
+    tf_assert(vm_thread);
+    jvmti_thread = &(vm_thread->jvmti_thread);
     tf_assert(jvmti_thread);
-    /*
-      tf_assert_same(jvmti_thread->thread_object->object->data, 
-      java_thread->object->data);
-      tf_assert_same(jvmti_thread->jenv, tts->jni_env);
-    */
-
-    //if(jvmti_thread->stop_exception != stop_exception){
-    //      return TEST_FAILED; ????????????????????????????????????????????
-    //}
     return TEST_PASSED;
 }
 

Modified: harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/utils/thread_unit_test_utils.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/utils/thread_unit_test_utils.h?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/utils/thread_unit_test_utils.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/utils/thread_unit_test_utils.h Mon Jul 16 12:32:35 2007
@@ -19,6 +19,7 @@
 #include "apr_thread_proc.h"
 #include "open/hycomp.h"
 #include "open/jthread.h"
+#include "thread_manager.h"
 
 // Tested Thread Phases
 #define TT_PHASE_NONE 0

Modified: harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.def
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.def?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.def (original)
+++ harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.def Mon Jul 16 12:32:35 2007
@@ -58,8 +58,6 @@
 hythread_group_create
 hythread_group_release
 hythread_group_get_list
-hythread_get_private_data
-hythread_set_private_data
 hythread_is_suspend_enabled
 hythread_suspend_enable
 hythread_suspend_disable
@@ -133,14 +131,12 @@
 hythread_lib_lock
 hythread_lib_unlock
 
-release_start_lock
-acquire_start_lock
-inflate_lock
-is_fat_lock
-owns_thin_lock
-unreserve_lock
-set_suspend_disable
-reset_suspend_disable
+hythread_inflate_lock
+hythread_is_fat_lock
+hythread_owns_thin_lock
+hythread_unreserve_lock
+hythread_set_suspend_disable
+hythread_reset_suspend_disable
 hythread_is_blocked_on_monitor_enter
 hythread_is_waiting
 hythread_is_in_native
@@ -153,11 +149,15 @@
 hythread_is_runnable
 hythread_thin_monitor_get_recursion
 hythread_exit
-array_add
-array_create
-array_delete
-array_get
 get_java_thread_group
+tm_properties
 
-tm_properties;
-Java_org_apache_harmony_drlvm_thread_ThreadHelper_getThreadIdOffset
+hythread_thread_lock
+hythread_thread_unlock
+hythread_get_state
+hythread_set_state
+hythread_get_thread_id_offset
+hythread_set_thread_stop_callback
+hythread_wait_for_nondaemon_threads
+hythread_increase_nondaemon_threads_count
+hythread_decrease_nondaemon_threads_count

Modified: harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.exp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.exp?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.exp (original)
+++ harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.exp Mon Jul 16 12:32:35 2007
@@ -58,8 +58,6 @@
 hythread_group_create;
 hythread_group_release;
 hythread_group_get_list;
-hythread_get_private_data;
-hythread_set_private_data;
 hythread_is_suspend_enabled;
 hythread_suspend_enable;
 hythread_suspend_disable;
@@ -143,14 +141,12 @@
 hythread_lib_unlock;
 set_safepoint_callback;
 
-release_start_lock;
-acquire_start_lock;
-inflate_lock;
-is_fat_lock;
-owns_thin_lock;
-unreserve_lock;
-set_suspend_disable;
-reset_suspend_disable;
+hythread_inflate_lock;
+hythread_is_fat_lock;
+hythread_owns_thin_lock;
+hythread_unreserve_lock;
+hythread_set_suspend_disable;
+hythread_reset_suspend_disable;
 hythread_is_blocked_on_monitor_enter;
 hythread_is_waiting;
 hythread_is_in_native;
@@ -163,14 +159,18 @@
 hythread_is_runnable;
 hythread_is_terminated;
 hythread_thin_monitor_get_recursion;
-array_add;
-array_create;
-array_delete;
-array_get;
 get_java_thread_group;
 tm_properties;
-Java_org_apache_harmony_drlvm_thread_ThreadHelper_getThreadIdOffset;
 
+hythread_thread_lock;
+hythread_thread_unlock;
+hythread_get_state;
+hythread_set_state;
+hythread_get_thread_id_offset;
+hythread_set_thread_stop_callback;
+hythread_wait_for_nondaemon_threads;
+hythread_increase_nondaemon_threads_count;
+hythread_decrease_nondaemon_threads_count;
 
 local: *;
 };

Modified: harmony/enhanced/drlvm/trunk/vm/thread/src/linux/os_thread.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/thread/src/linux/os_thread.c?view=diff&rev=556704&r1=556703&r2=556704
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/thread/src/linux/os_thread.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/thread/src/linux/os_thread.c Mon Jul 16 12:32:35 2007
@@ -141,7 +141,7 @@
  *
  * @param status        returns status of a thread
  */
-void os_thread_exit(int status)
+void os_thread_exit(IDATA status)
 {
     pthread_exit((void*)status);
 }



Mime
View raw message