You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by ge...@apache.org on 2006/08/23 18:49:21 UTC
svn commit: r434076 [1/18] - in /incubator/harmony/enhanced/drlvm/trunk:
build/make/components/ build/make/components/vm/ build/make/targets/
build/patches/lnx/ build/patches/lnx/APR/ build/patches/lnx/APR/threadproc/
build/patches/lnx/APR/threadproc/u...
Author: geirm
Date: Wed Aug 23 09:48:41 2006
New Revision: 434076
URL: http://svn.apache.org/viewvc?rev=434076&view=rev
Log:
HARMONY-1125 Thread manager component
This was created by applying the ThreadManager...zip
and then the DRLVM-update...diff patches, as these were the
materials voted on. I do believe that harmony-1125-updated.patch
does achieve the same thing, and I tested with both.
The method I used required some manual fixes, because SVN head
had changed slightly since the patch was originally cut.
Specifically, I had to adjust hythr.exp, jni_array.cpp and atomics.cpp
by hand, cleaing out the first, and modifiying trm_is_... where
appropos in assertions.
The result does pass the smoke and new unit tests, but it
induces a bug we had all along in the classlib re signals
and select(). I'll fix that next.
Added:
incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/jthread.xml (with props)
incubator/harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml (with props)
incubator/harmony/enhanced/drlvm/trunk/build/patches/lnx/
incubator/harmony/enhanced/drlvm/trunk/build/patches/lnx/APR/
incubator/harmony/enhanced/drlvm/trunk/build/patches/lnx/APR/threadproc/
incubator/harmony/enhanced/drlvm/trunk/build/patches/lnx/APR/threadproc/unix/
incubator/harmony/enhanced/drlvm/trunk/build/patches/lnx/APR/threadproc/unix/thread.c (with props)
incubator/harmony/enhanced/drlvm/trunk/build/patches/win/
incubator/harmony/enhanced/drlvm/trunk/build/patches/win/APR/
incubator/harmony/enhanced/drlvm/trunk/build/patches/win/APR/include/
incubator/harmony/enhanced/drlvm/trunk/build/patches/win/APR/include/arch/
incubator/harmony/enhanced/drlvm/trunk/build/patches/win/APR/include/arch/win32/
incubator/harmony/enhanced/drlvm/trunk/build/patches/win/APR/include/arch/win32/apr_arch_thread_cond.h (with props)
incubator/harmony/enhanced/drlvm/trunk/build/patches/win/APR/locks/
incubator/harmony/enhanced/drlvm/trunk/build/patches/win/APR/locks/win32/
incubator/harmony/enhanced/drlvm/trunk/build/patches/win/APR/locks/win32/thread_cond.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/include/open/hycomp.h (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/include/open/hythread.h (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/include/open/hythread_ext.h (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/include/open/jthread.h (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/include/open/thread_externals.h (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/include/open/thread_helpers.h (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/include/open/ti_thread.h (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/port/include/apr_thread_ext.h (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/port/src/thread/
incubator/harmony/enhanced/drlvm/trunk/vm/port/src/thread/linux/
incubator/harmony/enhanced/drlvm/trunk/vm/port/src/thread/linux/apr_thread_ext.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/port/src/thread/win/
incubator/harmony/enhanced/drlvm/trunk/vm/port/src/thread/win/apr_thread_ext.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/framework/
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/framework/testframe.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/framework/testframe.h (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_attrs.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_basic.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_identify.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_interrupt.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_monitors.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_park.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_ptr_conv.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_java_suspend.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_basic.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_fat_monitor.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_suspend.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_thin_monitor.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_performance.h (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_performance_basic.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_performance_concurrent_mutex.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_instrum.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_local_storage.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_monitor_info.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_peak_count.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_raw_monitors.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_state.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_ti_timing.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/utils/
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/utils/thread_unit_test_main.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/utils/thread_unit_test_utils.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/utils/thread_unit_test_utils.h (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/utils/thread_unit_test_vm_emulator.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/utils/tm2vm.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/ThreadManager.htm
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/conventions.htm
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/drl.css (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/images/
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/images/JavaAttached.gif (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/images/Lock_reservation.gif (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/images/Monitors.gif (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/images/NativeUnattachedThread.gif (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/images/SuspendAll.gif (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/images/Synchronizer_mutex.gif (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/images/ThreadCreation.gif (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/images/ThreadingSystem.gif (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/images/inflated_lockword.gif (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/images/inflated_thin_monitor.gif (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/images/lock_reserv.gif (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/images/locking.gif (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/images/safePoint.gif (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/images/safeRegion.gif (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/images/thread_groups.gif (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/images/tm_in_vm.gif (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/doc/images/uninflated_lockword.gif (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/doxyfile
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.def
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/hythr.exp
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_helpers.cpp (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_init.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_attrs.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_basic.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_interrupt.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_iterator.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_monitors.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_park.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_suspend.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_attrs.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_basic.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_condvar.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_fat_monitor.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_groups.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_interrupt.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_iterator.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_latch.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_mutex.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_park.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_semaphore.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_state.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_suspend.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_thin_monitor.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_tls.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_private.h (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_ti_instr.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_ti_monitors.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_ti_others.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_ti_timing.c (with props)
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ThreadWeakRef.java (with props)
Modified:
incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm.xml
incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/em.xml
incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/gc.xml
incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/hythr.xml
incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/interpreter.xml
incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/port.xml
incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/vmcore.xml
incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/vmstart.xml
incubator/harmony/enhanced/drlvm/trunk/build/make/targets/common_vm.xml
incubator/harmony/enhanced/drlvm/trunk/build/make/targets/test.xml
incubator/harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.h
incubator/harmony/enhanced/drlvm/trunk/vm/em/src/EBProfileCollector.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/em/src/EBProfileCollector.h
incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/block_store.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/garbage_collector.h
incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/gc_header.h
incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/gc_thread.h
incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/gc_threads.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/gc_v4.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/work_packet_manager.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/include/jni.h
incubator/harmony/enhanced/drlvm/trunk/vm/include/jvmti_types.h
incubator/harmony/enhanced/drlvm/trunk/vm/include/open/thread.h
incubator/harmony/enhanced/drlvm/trunk/vm/include/open/types.h
incubator/harmony/enhanced/drlvm/trunk/vm/include/open/vm_util.h
incubator/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_defs.h
incubator/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native.h
incubator/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_em64t.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ia32.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ipf.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_vm_helpers.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_vm_helpers.h
incubator/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter_ti.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_ia32.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/port/include/port_atomic.h
incubator/harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_defs.h
incubator/harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/enc_tabl.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/encoder.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/encoder.h
incubator/harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/encoder.inl
incubator/harmony/enhanced/drlvm/trunk/vm/port/src/lil/ia32/pim/m2n_ia32.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/port/src/lil/ipf/pim/m2n_ipf.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/port/src/lil/ipf/pim/stack_iterator_ipf.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/tests/smoke/StackTest.java
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/classloader.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/dll_jit_intf.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/exceptions.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/jvmti_direct.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/lock_manager.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/mon_enter_exit.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/object_generic.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/object_layout.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/suspend_checker.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/thread_generic.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/thread_manager.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/verify_stack_enumeration.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/version_svn_tag.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/vm_log.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/vm_threads.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Class.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Class_File_Loader.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Environment.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Initialize.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Prepare.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Resolve.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/String_Pool.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/method.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/dll_gc.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/root_set_enum_common.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/stop_the_world_root_set_enum.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/finalize.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_main.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/ini.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni_array.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni_field.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni_method.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni_utils.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_break.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_class.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_event.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_field.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_heap.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_locals.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_method.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_object.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_rawmon.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_stack.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_thread.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_thread_group.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Object.java
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Runtime.java
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ThreadGroup.java
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/VMStart.java
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/VMThreadManager.java
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_FinalizerThread.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_VMClassRegistry.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_VMMemoryManager.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_VMStart.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_VMThreadManager.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_VMThreadManager.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_util_concurrent_locks_LockSupport.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_vm_VMStack.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/object/object_handles.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/object/vm_arrays.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/reflection/reflection.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/stack/stack_trace.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/atomics.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/hythr/hythr.def
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/hythr/hythr.exp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/hythr/hythreads.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/hythr/hythreads.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/lock_manager.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/mon_enter_exit.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/object_generic.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/suspend.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_dump.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_generic.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_manager.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/verify_stack_enumeration.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/compile_IA32.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/jit_generic_rt_support_ia32.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/jit_lock_rt_support_ia32.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/jit_runtime_support_ia32.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/compile_IA32.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/ini_iA32.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/jit_generic_rt_support_ia32.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/jit_lock_rt_support_ia32.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/jit_runtime_support_ia32.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/compile_ipf.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/ini_ipf.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/jit_runtime_support_ipf.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/include/platform.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/os_wrapper.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/stubs.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/natives_support.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/vm_strings.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/em64t/nt_exception_filter.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/ia32/nt_exception_filter.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/include/java_lang_thread_nt.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/include/platform.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/include/platform_lowlevel.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/include/vm_process.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/ipf/nt_exception_filter.cpp
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/nt_platform_utils.cpp
Modified: incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm.xml?rev=434076&r1=434075&r2=434076&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm.xml (original)
+++ incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm.xml Wed Aug 23 09:48:41 2006
@@ -63,6 +63,8 @@
vm.vmstart" />
</select>
+ <property name="test.depends" value="vm.vmcore"/>
+
<property name="smoke.test.depends" value="" />
<property name="smoke.test.javasrc" location="${build.VM.home}/tests/smoke" />
Modified: incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/em.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/em.xml?rev=434076&r1=434075&r2=434076&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/em.xml (original)
+++ incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/em.xml Wed Aug 23 09:48:41 2006
@@ -28,7 +28,7 @@
<project name="vm.em">
<target name="init" depends="common_vm">
- <property name="build.depends" value="extra.apr, vm.vmcore" />
+ <property name="build.depends" value="extra.apr, vm.vmcore, vm.hythr" />
<property name="outtype" value="shared" />
<property name="libname" value="em" />
<property name="src" location="${build.vm.home}" />
@@ -73,7 +73,7 @@
<linker id="linker" extends="common.linker">
<libset libs="${vm.vmcore.lib}" dir="${vm.vmcore.libdir}" />
<libset libs="${extra.apr.lib}" dir="${extra.apr.libdir}" />
-
+ <libset libs="${vm.hythr.lib}" dir="${vm.hythr.libdir}" />
<select os="lnx">
<linkerarg value="-Bsymbolic" />
<linkerarg value="-shared" />
Modified: incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/gc.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/gc.xml?rev=434076&r1=434075&r2=434076&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/gc.xml (original)
+++ incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/gc.xml Wed Aug 23 09:48:41 2006
@@ -27,7 +27,7 @@
<project name="vm.gc">
<target name="init" depends="common_vm">
- <property name="build.depends" value="extra.apr,vm.vmcore" />
+ <property name="build.depends" value="extra.apr,vm.vmcore,vm.hythr" />
<property name="outtype" value="shared" />
<property name="libname" value="gc" />
<property name="src" location="${build.vm.home}" />
@@ -95,7 +95,7 @@
</select>
<libset libs="${vm.vmcore.lib}" dir="${vm.vmcore.libdir}" />
-
+ <libset libs="${vm.hythr.lib}" dir="${vm.hythr.libdir}" />
<select os="lnx">
<linkerarg value="-Bsymbolic" />
</select>
Modified: incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/hythr.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/hythr.xml?rev=434076&r1=434075&r2=434076&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/hythr.xml (original)
+++ incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/hythr.xml Wed Aug 23 09:48:41 2006
@@ -27,34 +27,26 @@
<project name="vm.hythr">
<target name="init" depends="common_vm">
- <property name="build.depends" value="extra.apr,extra.aprutil" />
+ <property name="build.depends" value="extra.apr,vm.encoder,
+vm.port,extra.log4cxx, extra.aprutil" />
<property name="libname" value="hythr" />
<property name="outtype" value="shared" />
<property name="src" location="${build.vm.home}" />
- <compiler id="cpp.compiler" extends="common.cpp.compiler">
- <includepath>
- <pathelement location="${extra.apr.includes}" />
- </includepath>
+ <compiler id="c.compiler" extends="common.c.compiler">
<includepath>
- <dirset dir="${src}">
- <include name="include" />
- <include name="vmcore/include" />
- <include name="port/src/include" />
-
- <select os="win">
- <include name="vmcore/src/util/win/include" />
- </select>
-
- <select os="lnx">
- <include name="vmcore/src/util/linux/include" />
- </select>
- </dirset>
+ <pathelement location="${extra.apr.includes}" />
+ <pathelement location="${extra.apr.includes}/apr-1" />
+ <pathelement location="${vm.port.includes}" />
+ <pathelement location="${build.vm.home}/thread/src" />
+ <pathelement location="${build.vm.home}/port/src/encoder/ia32_em64t" />
</includepath>
<fileset dir="${src}">
- <include name="vmcore/src/thread/hythr/*.cpp" />
+ <include name="thread/src/*native*.c" />
+ <!-- include name="thread/src/*task*.c" / -->
+ <include name="thread/src/thread_init.c" />
</fileset>
<select os="win" cfg="release" cxx="icl">
@@ -62,22 +54,32 @@
</select>
<select os="win">
- <defineset define="_USRDLL,APR_DECLARE_STATIC" />
+ <defineset define="_USRDLL" />
</select>
<select os="lnx">
<defineset define="LINUX" />
</select>
- <select os="lnx">
- <compilerarg value="-Wno-deprecated" />
- <compilerarg value="-fno-exceptions" />
- </select>
+ <defineset define="APR_DECLARE_STATIC" />
</compiler>
+
<linker id="linker" extends="common.linker">
+ <libset libs="${vm.port.lib}"
+ dir="${vm.port.libdir}" />
+
+ <libset libs="${extra.log4cxx.lib}"
+ dir="${extra.log4cxx.libdir}" />
+
+ <libset libs="${extra.aprutil.lib}"
+ dir="${extra.aprutil.libdir}" />
+
+ <libset libs="${extra.apr.lib}"
+ dir="${extra.apr.libdir}" />
+
<select os="win">
- <linkerarg value="/DEF:${src}/vmcore/src/thread/hythr/hythr.def" />
+ <linkerarg value="/DEF:${src}/thread/src/hythr.def" />
</select>
<select cfg="debug" os="win">
@@ -87,11 +89,8 @@
<select os="lnx">
<linkerarg value="-Wl,-init" />
<linkerarg value="-Wl,hythread_library_init" />
- <linkerarg value="-Wl,--version-script,${src}/vmcore/src/thread/hythr/hythr.exp" />
+ <linkerarg value="-Wl,--version-script,${src}/thread/src/hythr.exp" />
</select>
-
- <libset libs="${extra.apr.lib}"
- dir="${extra.apr.libdir}" />
<select os="win">
<syslibset libs="advapi32,ws2_32" />
Modified: incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/interpreter.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/interpreter.xml?rev=434076&r1=434075&r2=434076&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/interpreter.xml (original)
+++ incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/interpreter.xml Wed Aug 23 09:48:41 2006
@@ -29,7 +29,7 @@
<target name="init" depends="common_vm">
<property name="build.depends" value="extra.apr,
extra.log4cxx,
- vm.vmcore" />
+ vm.vmcore,vm.hythr" />
<property name="libname" value="interpreter" />
<property name="outtype" value="shared" />
<property name="src" location="${build.vm.home}/interpreter/src" />
@@ -160,6 +160,7 @@
</select>
<libset libs="${vm.vmcore.lib}" dir="${vm.vmcore.libdir}" />
+ <libset libs="${vm.hythr.lib}" dir="${vm.hythr.libdir}" />
</linker>
</target>
</project>
Added: incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/jthread.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/jthread.xml?rev=434076&view=auto
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/jthread.xml (added)
+++ incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/jthread.xml Wed Aug 23 09:48:41 2006
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!--
+Author: Sergey V. Dmitriev, Artem.A.Aliev
+Version: $Revision$
+-->
+<!--
+ This is build descriptor for the component "vm.jthread".
+
+ Please refer to make/components/README.txt for details about the component
+ build descriptor structure.
+ -->
+
+<project name="vm.jthread">
+ <target name="init" depends="common_vm">
+ <property name="build.depends" value="extra.apr,vm.encoder,
+vm.hythr" />
+ <property name="libname" value="jthread" />
+ <property name="outtype" value="static" />
+ <property name="src" location="${build.vm.home}" />
+
+ <compiler id="c.compiler" extends="common.c.compiler">
+
+ <includepath>
+ <pathelement location="${extra.apr.includes}" />
+ <pathelement location="${extra.apr.includes}/apr-1" />
+ <pathelement location="${vm.port.includes}" />
+ <pathelement location="${build.vm.home}/thread/src" />
+ <pathelement location="${build.vm.home}/port/src/encoder/ia32_em64t" />
+ </includepath>
+
+ <fileset dir="${src}">
+ <include name="thread/src/*java*.c" />
+ <include name="thread/src/thread_ti_*.c" />
+ </fileset>
+
+ <select os="win" cfg="release" cxx="icl">
+ <compilerarg value="/Qip" />
+ </select>
+
+ <select os="lnx">
+ <defineset define="LINUX" />
+ </select>
+ <defineset define="BUILDING_VM" />
+ <defineset define="APR_DECLARE_STATIC" />
+ </compiler>
+
+ <compiler id="cpp.compiler" extends="common.cpp.compiler">
+ <includepath>
+ <pathelement location="${extra.apr.includes}" />
+ <pathelement location="${extra.apr.includes}/apr-1" />
+ <pathelement location="${vm.port.includes}" />
+ <pathelement location="${build.vm.home}/thread/src" />
+ <pathelement location="${build.vm.home}/port/src/encoder/ia32_em64t" />
+ </includepath>
+
+ <fileset dir="${src}">
+ <include name="thread/src/*.cpp" />
+ </fileset>
+
+ <select os="win" cfg="release" cxx="icl">
+ <compilerarg value="/Qip" />
+ </select>
+
+ <select os="lnx">
+ <defineset define="LINUX" />
+ </select>
+
+ <select os="lnx">
+ <compilerarg value="-Wno-deprecated" />
+ <compilerarg value="-fno-exceptions" />
+ </select>
+ </compiler>
+
+ <linker id="linker" extends="common.linker">
+
+ <select cfg="debug" os="win">
+ <linkerarg value="/NODEFAULTLIB:libcmt.lib" />
+ </select>
+
+ <select os="win">
+ <syslibset libs="advapi32,ws2_32" />
+ </select>
+ </linker>
+ </target>
+</project>
Propchange: incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/jthread.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/port.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/port.xml?rev=434076&r1=434075&r2=434076&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/port.xml (original)
+++ incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/port.xml Wed Aug 23 09:48:41 2006
@@ -51,6 +51,7 @@
<include name="file_io/linux/*.c" />
<include name="misc/linux/*.c" />
<include name="vmem/linux/*.c" />
+ <include name="thread/linux/*.c" />
<select arch="ia32,em64t">
<include name="atomic/linux/*.c" />
@@ -67,6 +68,7 @@
<include name="file_io/win/*.c" />
<include name="misc/win/*.c" />
<include name="vmem/win/*.c" />
+ <include name="thread/win/*.c" />
</select>
</fileset>
Modified: incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/vmcore.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/vmcore.xml?rev=434076&r1=434075&r2=434076&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/vmcore.xml (original)
+++ incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/vmcore.xml Wed Aug 23 09:48:41 2006
@@ -32,7 +32,8 @@
extra.log4cxx,
extra.zlib,
vm.encoder,
- vm.port" />
+ vm.port, vm.hythr, vm.jthread" />
+
<property name="libname" value="vmcore" />
<property name="outtype" value="shared" />
<property name="src" location="${build.vm.home}" />
@@ -44,6 +45,18 @@
</filterset>
</copy>
+ <compiler id="c.compiler" extends="common.c.compiler">
+ <includepath>
+ <pathelement location="${build.vm.home}/include" />
+ <pathelement location="${extra.apr.includes}/apr-1" />
+ <pathelement location="${extra.apr.includes}" />
+ <pathelement location="${extra.log4cxx.includes}" />
+ <pathelement location="${vm.port.includes}" />
+ </includepath>
+
+
+ <defineset define="BUILDING_VM,GC_V4,USE_DLL_JIT,APR_DECLARE_STATIC" />
+ </compiler>
<compiler id="cpp.compiler" extends="common.cpp.compiler">
<fileset dir="${build.vm.home}/vmcore/src">
@@ -148,6 +161,7 @@
<includepath>
<pathelement location="${extra.apr.includes}" />
+ <pathelement location="${extra.apr.includes}/apr-1" />
<pathelement location="${extra.log4cxx.includes}" />
<select os="win">
<pathelement location="${extra.zlib.includes}" />
@@ -250,6 +264,12 @@
<libset libs="${extra.apr.lib}"
dir="${extra.apr.libdir}" />
+ <libset libs="${vm.hythr.lib}"
+ dir="${vm.hythr.libdir}" />
+
+ <libset libs="${vm.jthread.lib}"
+ dir="${vm.jthread.libdir}" />
+
<select os="win">
<libset libs="${extra.zlib.lib}"
dir="${extra.zlib.libdir}" />
@@ -269,5 +289,17 @@
<linkerarg value="-lstdc++" />
</select>
</linker>
+
+ <path id="unit.test.c.include">
+ <pathelement location="${build.VM.home}/tests/unit/thread/utils" />
+ <pathelement location="${build.semi.dir}/extra/apr/include" />
+ <pathelement location="${build.semi.dir}/extra/apr/include/apr-1" />
+ <pathelement location="${build.VM.home}/vmcore/include" />
+ </path>
+
+ <fileset id="unit.test.c.src" dir="${build.VM.home}/tests/unit/thread">
+ <include name="*.c" />
+ <exclude name="*performance*"/>
+ </fileset>
</target>
</project>
Modified: incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/vmstart.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/vmstart.xml?rev=434076&r1=434075&r2=434076&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/vmstart.xml (original)
+++ incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/vmstart.xml Wed Aug 23 09:48:41 2006
@@ -33,7 +33,8 @@
vm.port,
extra.apr,
extra.aprutil,
- extra.log4cxx" />
+ extra.log4cxx,
+ vm.hythr" />
<property name="outtype" value="executable" />
<property name="libname" value="java" />
<property name="src" location="${build.vm.home}/launcher/src" />
@@ -48,6 +49,7 @@
<libset libs="${vm.vmcore.lib}" dir="${vm.vmcore.libdir}" />
<libset libs="${vm.encoder.lib}" dir="${vm.encoder.libdir}" />
<libset libs="${vm.port.lib}" dir="${vm.port.libdir}" />
+ <libset libs="${vm.hythr.lib}" dir="${vm.hythr.libdir}" />
<libset libs="${extra.aprutil.lib}" dir="${extra.aprutil.libdir}" />
<libset libs="${extra.apr.lib}" dir="${extra.apr.libdir}" />
<select cfg="debug" os="win">
Modified: incubator/harmony/enhanced/drlvm/trunk/build/make/targets/common_vm.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/build/make/targets/common_vm.xml?rev=434076&r1=434075&r2=434076&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/build/make/targets/common_vm.xml (original)
+++ incubator/harmony/enhanced/drlvm/trunk/build/make/targets/common_vm.xml Wed Aug 23 09:48:41 2006
@@ -1,5 +1,5 @@
<!--
- Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable.
+ Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -82,6 +82,7 @@
<select os="lnx">
<defineset define="PLATFORM_POSIX" />
+ <defineset define="LINUX" />
<defineset define="__SMP__" />
<defineset define="_REENTRANT" />
<defineset define="LINUX_TLS_OPT" />
@@ -210,5 +211,18 @@
<syslibset type="shared" libs="gcc_s" />
</select>
</linker>
+
+ <fileset id="unit.test.c.framework.src"
+ dir="${build.VM.home}/tests/unit/framework">
+ <include name="*.c" />
+ </fileset>
+
+ <path id="unit.test.common.c.include">
+ <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}/port/include" />
+ </path>
</target>
</project>
Added: incubator/harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml?rev=434076&view=auto
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml (added)
+++ incubator/harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml Wed Aug 23 09:48:41 2006
@@ -0,0 +1,234 @@
+<!--
+ Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!--
+Author: Sergey V. Dmitriev, Marina V. Goldburt
+Version: $Revision$
+-->
+
+<project name="C UNIT TESTS">
+ <target name="cunit.test" depends="init_component">
+ <if>
+ <isreference refid="unit.test.c.src" />
+ <then>
+
+ <!-- compiler to compile framework as well as the unit tests -->
+ <compiler name="${build.cxx}" id="unit.test.c.compiler">
+ <defineset define="APR_DECLARE_STATIC, _DEBUG, VM_STATS" />
+ <defineset define="BUILDING_VM" />
+
+ <select os="win">
+ <defineset define="PLATFORM_NT, WIN32, _WINDOWS, _IA32_" />
+ <defineset define="_WIN32_WINNT=0x0501" />
+ </select>
+
+ <select os="lnx">
+ <defineset define="LINUX, GC_V4" />
+ <defineset define="USE_DLL_JIT, PLATFORM_POSIX" />
+ <defineset define="__SMP__, _REENTRANT" />
+ <defineset define="LINUX_TLS_OPT, _IA32_" />
+ <defineset define="_LARGEFILE64_SOURCE" />
+ <compilerarg value="-Wall" />
+ <compilerarg value="-fno-exceptions" />
+ <compilerarg value="-g" />
+ <compilerarg value="-O0" />
+ </select>
+ </compiler>
+
+ <!-- Compiling framework -->
+ <echo message="## Compiling framework..." />
+
+ <!-- a new property: cunit tests work dir -->
+ <property name="unit.test.c.workdir"
+ value="${build.dir}/_cunit.tests" />
+
+ <mkdir dir="${unit.test.c.workdir}/_obj" />
+
+ <cc objdir="${unit.test.c.workdir}/_obj"
+ debug="true"
+ runtime="static"
+ multithreaded="true">
+
+ <compiler refid="unit.test.c.compiler" />
+
+ <fileset refid="unit.test.c.framework.src" />
+ <fileset dir="${build.VM.home}/tests/unit/thread/utils">
+ <include name="*.c" />
+ </fileset>
+
+ <includepath refid="unit.test.common.c.include" />
+ <includepath refid="unit.test.c.include" />
+ </cc>
+
+ <!-- a list of all source files with unit tests -->
+
+ <pathconvert pathsep=","
+ property="unit.test.c.files"
+ refid="unit.test.c.src" />
+
+ <!-- operation system sensitive executive binary file extention.
+ simply said: "" or ".exe" ;) -->
+ <condition property="extention" value=".exe">
+ <isset property="if.win" />
+ </condition>
+ <property name="extention" value="" />
+
+ <!-- replacing: 'xxx.c, yyy.c' => 'xxx yyy' -->
+ <propertyregex override="yes"
+ property="unit.test.c.files"
+ input="${unit.test.c.files}"
+ regexp="\.c"
+ replace=""
+ defaultValue="${unit.test.c.files}" />
+
+
+ <!-- Compiling unit tests -->
+
+ <echo message="## Compiling C unit tests" />
+
+ <cc objdir="${unit.test.c.workdir}/_obj"
+ debug="true"
+ runtime="static"
+ multithreaded="true"
+ subsystem="console">
+ <compiler refid="unit.test.c.compiler" />
+
+ <fileset refid="unit.test.c.src" />
+ <includepath refid="unit.test.common.c.include" />
+ <includepath refid="unit.test.c.include" />
+ </cc>
+
+ <mkdir dir="${unit.test.c.workdir}/_bin" />
+
+ <!-- copy zlib library; it's necessary for test execution -->
+ <copy todir="${unit.test.c.workdir}/_bin">
+ <fileset dir="${external.dep.CLASSLIB}/deploy/jdk/jre/bin" includes="*hyzlib*" />
+ </copy>
+
+ <mkdir dir="${unit.test.c.workdir}/report" />
+
+ <!-- set of properties which will be needed for test execution -->
+ <property name="filename" value="--" />
+ <property name="outputproperty" value="--" />
+ <property name="resultproperty" value="--" />
+
+ <for list="${unit.test.c.files}" param="file" delimiter=",">
+ <sequential>
+
+ <!-- make it possible to overwrite the property -->
+ <var name="filename" unset="true" />
+ <basename property="filename" file="@{file}" />
+
+ <!-- Linking unit test -->
+ <echo message="## Linking C unit test: ${filename}" />
+
+ <cc name="${build.cxx}"
+ debug="true"
+ outfile="${unit.test.c.workdir}/_bin/${filename}"
+ outtype="executable"
+ subsystem="console">
+ <linker name="${build.cxx}">
+ <fileset dir="${unit.test.c.workdir}/_obj">
+ <include name="${filename}.o*" />
+ <include name="thread_unit_test_main.o*" />
+ <include name="thread_unit_test_utils.o*" />
+ <include name="thread_unit_test_vm_emulator.o*" />
+ <include name="testframe.o*" />
+ <include name="tm2vm.o*" />
+ </fileset>
+
+ <fileset dir="${build.semi.dir}/vm/jthread/_obj">
+ <include name="*.o*" />
+ </fileset>
+
+ <fileset dir="${build.semi.dir}/vm/hythr/_obj">
+ <include name="*.o*" />
+ </fileset>
+
+ <libset libs="encoder" dir="${build.semi.dir}/vm/encoder/_bin" />
+ <libset libs="apr-1" dir="${build.semi.dir}/extra/apr/_bin" />
+ <libset libs="aprutil-1" dir="${build.semi.dir}/extra/aprutil/_bin" />
+ <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" />
+
+ <select os="win">
+ <syslibset libs="advapi32, ws2_32, mswsock, user32, userenv, odbc32" />
+ <linkerarg value="/NODEFAULTLIB:libcmt.lib" />
+ </select>
+
+ <select os="lnx" cxx="gcc">
+ <syslibset type="shared" libs="stdc++, gcc_s, pthread" />
+ </select>
+ </linker>
+ </cc>
+ </sequential>
+ </for>
+
+ <for list="${unit.test.c.files}" param="file" delimiter=",">
+ <sequential>
+
+ <!-- make it possible to overwrite the property -->
+ <var name="filename" unset="true" />
+ <basename property="filename" file="@{file}" />
+
+ <!-- Executing unit test -->
+ <echo message="## Executing C unit test: ${filename}" />
+
+ <var name="outputproperty" unset="true" />
+ <var name="resultproperty" unset="true" />
+
+ <exec dir="${unit.test.c.workdir}/_bin"
+ executable="${unit.test.c.workdir}/_bin/${filename}${extention}"
+ resultproperty="resultproperty"
+ outputproperty="outputproperty">
+ <select os="lnx">
+ <env key="LD_LIBRARY_PATH" path="${unit.test.c.workdir}/_bin" />
+ </select>
+ </exec>
+
+ <echo file="${unit.test.c.workdir}/report/${filename}.out"
+ message="${outputproperty}" />
+ <echo message="${outputproperty}" />
+
+ <if>
+ <not>
+ <equals arg1="${resultproperty}" arg2="0" />
+ </not>
+ <then>
+ <property name="some.test.failed" value="true" />
+ <echo message="## TEST FAILED" />
+ </then>
+ <else>
+ <echo message="## TEST PASSED" />
+ </else>
+ </if>
+ </sequential>
+ </for>
+
+ <if>
+ <isset property="some.test.failed" />
+ <then>
+ <echo message="## Please find tests and results at ${build.dir}/_cunit.tests/" />
+ <fail message="## SOME TESTS FAILED" />
+ </then>
+ </if>
+
+ <echo message="## Please find tests and results at ${build.dir}/_cunit.tests/" />
+ <echo message="## TESTS PASSED" />
+ </then>
+ </if>
+ </target>
+</project>
Propchange: incubator/harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/harmony/enhanced/drlvm/trunk/build/make/targets/test.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/build/make/targets/test.xml?rev=434076&r1=434075&r2=434076&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/build/make/targets/test.xml (original)
+++ incubator/harmony/enhanced/drlvm/trunk/build/make/targets/test.xml Wed Aug 23 09:48:41 2006
@@ -18,5 +18,6 @@
Version: $Revision: 1.3.2.2 $
-->
<project name="ALL TESTS">
- <target name="test" depends="unit.test, smoke.test" />
-</project>
\ No newline at end of file
+ <target name="test" depends="unit.test, smoke.test, cunit.test" />
+</project>
+
Added: incubator/harmony/enhanced/drlvm/trunk/build/patches/lnx/APR/threadproc/unix/thread.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/build/patches/lnx/APR/threadproc/unix/thread.c?rev=434076&view=auto
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/build/patches/lnx/APR/threadproc/unix/thread.c (added)
+++ incubator/harmony/enhanced/drlvm/trunk/build/patches/lnx/APR/threadproc/unix/thread.c Wed Aug 23 09:48:41 2006
@@ -0,0 +1,321 @@
+/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "apr.h"
+#include "apr_portable.h"
+#include "apr_arch_threadproc.h"
+
+#if APR_HAS_THREADS
+
+#if APR_HAVE_PTHREAD_H
+
+/* Destroy the threadattr object */
+static apr_status_t threadattr_cleanup(void *data)
+{
+ apr_threadattr_t *attr = data;
+ apr_status_t rv;
+
+ rv = pthread_attr_destroy(&attr->attr);
+#ifdef PTHREAD_SETS_ERRNO
+ if (rv) {
+ rv = errno;
+ }
+#endif
+ return rv;
+}
+
+APR_DECLARE(apr_status_t) apr_threadattr_create(apr_threadattr_t **new,
+ apr_pool_t *pool)
+{
+ apr_status_t stat;
+
+ (*new) = apr_palloc(pool, sizeof(apr_threadattr_t));
+ (*new)->pool = pool;
+ stat = pthread_attr_init(&(*new)->attr);
+
+ if (stat == 0) {
+ apr_pool_cleanup_register(pool, *new, threadattr_cleanup,
+ apr_pool_cleanup_null);
+ return APR_SUCCESS;
+ }
+#ifdef PTHREAD_SETS_ERRNO
+ stat = errno;
+#endif
+
+ return stat;
+}
+
+#define DETACH_ARG(v) ((v) ? PTHREAD_CREATE_DETACHED : PTHREAD_CREATE_JOINABLE)
+
+APR_DECLARE(apr_status_t) apr_threadattr_detach_set(apr_threadattr_t *attr,
+ apr_int32_t on)
+{
+ apr_status_t stat;
+#ifdef PTHREAD_ATTR_SETDETACHSTATE_ARG2_ADDR
+ int arg = DETACH_ARG(v);
+
+ if ((stat = pthread_attr_setdetachstate(&attr->attr, &arg)) == 0) {
+#else
+ if ((stat = pthread_attr_setdetachstate(&attr->attr,
+ DETACH_ARG(on))) == 0) {
+#endif
+ return APR_SUCCESS;
+ }
+ else {
+#ifdef PTHREAD_SETS_ERRNO
+ stat = errno;
+#endif
+
+ return stat;
+ }
+}
+
+APR_DECLARE(apr_status_t) apr_threadattr_detach_get(apr_threadattr_t *attr)
+{
+ int state;
+
+#ifdef PTHREAD_ATTR_GETDETACHSTATE_TAKES_ONE_ARG
+ state = pthread_attr_getdetachstate(&attr->attr);
+#else
+ pthread_attr_getdetachstate(&attr->attr, &state);
+#endif
+ if (state == 1)
+ return APR_DETACH;
+ return APR_NOTDETACH;
+}
+
+APR_DECLARE(apr_status_t) apr_threadattr_stacksize_set(apr_threadattr_t *attr,
+ apr_size_t stacksize)
+{
+ int stat;
+
+ stat = pthread_attr_setstacksize(&attr->attr, stacksize);
+ if (stat == 0) {
+ return APR_SUCCESS;
+ }
+#ifdef PTHREAD_SETS_ERRNO
+ stat = errno;
+#endif
+
+ return stat;
+}
+
+APR_DECLARE(apr_status_t) apr_threadattr_guardsize_set(apr_threadattr_t *attr,
+ apr_size_t size)
+{
+#ifdef HAVE_PTHREAD_ATTR_SETGUARDSIZE
+ apr_status_t rv;
+
+ rv = pthread_attr_setguardsize(&attr->attr, size);
+ if (rv == 0) {
+ return APR_SUCCESS;
+ }
+#ifdef PTHREAD_SETS_ERRNO
+ rv = errno;
+#endif
+ return rv;
+#else
+ return APR_ENOTIMPL;
+#endif
+}
+
+static void *dummy_worker(void *opaque)
+{
+ apr_thread_t *thread = (apr_thread_t*)opaque;
+ return thread->func(thread, thread->data);
+}
+
+APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new,
+ apr_threadattr_t *attr,
+ apr_thread_start_t func,
+ void *data,
+ apr_pool_t *pool)
+{
+ apr_status_t stat;
+ pthread_attr_t *temp;
+
+ (*new) = (apr_thread_t *)apr_pcalloc(pool, sizeof(apr_thread_t));
+
+ if ((*new) == NULL) {
+ return APR_ENOMEM;
+ }
+
+ (*new)->td = (pthread_t *)apr_pcalloc(pool, sizeof(pthread_t));
+
+ if ((*new)->td == NULL) {
+ return APR_ENOMEM;
+ }
+
+ (*new)->pool = pool;
+ (*new)->data = data;
+ (*new)->func = func;
+
+ if (attr)
+ temp = &attr->attr;
+ else
+ temp = NULL;
+
+ stat = apr_pool_create(&(*new)->pool, pool);
+ if (stat != APR_SUCCESS) {
+ return stat;
+ }
+
+ if ((stat = pthread_create((*new)->td, temp, dummy_worker, (*new))) == 0) {
+ return APR_SUCCESS;
+ }
+ else {
+#ifdef PTHREAD_SETS_ERRNO
+ stat = errno;
+#endif
+
+ return stat;
+ }
+}
+
+APR_DECLARE(apr_os_thread_t) apr_os_thread_current(void)
+{
+ return pthread_self();
+}
+
+APR_DECLARE(int) apr_os_thread_equal(apr_os_thread_t tid1,
+ apr_os_thread_t tid2)
+{
+ return pthread_equal(tid1, tid2);
+}
+
+APR_DECLARE(apr_status_t) apr_thread_exit(apr_thread_t *thd,
+ apr_status_t retval)
+{
+ thd->exitval = retval;
+ apr_pool_destroy(thd->pool);
+ pthread_exit(NULL);
+ return APR_SUCCESS;
+}
+
+APR_DECLARE(apr_status_t) apr_thread_join(apr_status_t *retval,
+ apr_thread_t *thd)
+{
+ apr_status_t stat;
+ apr_status_t *thread_stat;
+
+ if ((stat = pthread_join(*thd->td,(void *)&thread_stat)) == 0) {
+ *retval = thd->exitval;
+ return APR_SUCCESS;
+ }
+ else {
+#ifdef PTHREAD_SETS_ERRNO
+ stat = errno;
+#endif
+
+ return stat;
+ }
+}
+
+APR_DECLARE(apr_status_t) apr_thread_detach(apr_thread_t *thd)
+{
+ apr_status_t stat;
+
+#ifdef PTHREAD_DETACH_ARG1_ADDR
+ if ((stat = pthread_detach(thd->td)) == 0) {
+#else
+ if ((stat = pthread_detach(*thd->td)) == 0) {
+#endif
+
+ return APR_SUCCESS;
+ }
+ else {
+#ifdef PTHREAD_SETS_ERRNO
+ stat = errno;
+#endif
+
+ return stat;
+ }
+}
+
+void apr_thread_yield()
+{
+ sched_yield();
+}
+
+APR_DECLARE(apr_status_t) apr_thread_data_get(void **data, const char *key,
+ apr_thread_t *thread)
+{
+ return apr_pool_userdata_get(data, key, thread->pool);
+}
+
+APR_DECLARE(apr_status_t) apr_thread_data_set(void *data, const char *key,
+ apr_status_t (*cleanup)(void *),
+ apr_thread_t *thread)
+{
+ return apr_pool_userdata_set(data, key, cleanup, thread->pool);
+}
+
+APR_DECLARE(apr_status_t) apr_os_thread_get(apr_os_thread_t **thethd,
+ apr_thread_t *thd)
+{
+ *thethd = thd->td;
+ return APR_SUCCESS;
+}
+
+APR_DECLARE(apr_status_t) apr_os_thread_put(apr_thread_t **thd,
+ apr_os_thread_t *thethd,
+ apr_pool_t *pool)
+{
+ if (pool == NULL) {
+ return APR_ENOPOOL;
+ }
+
+ if ((*thd) == NULL) {
+ (*thd) = (apr_thread_t *)apr_pcalloc(pool, sizeof(apr_thread_t));
+ (*thd)->pool = pool;
+ }
+
+ (*thd)->td = thethd;
+ return APR_SUCCESS;
+}
+
+APR_DECLARE(apr_status_t) apr_thread_once_init(apr_thread_once_t **control,
+ apr_pool_t *p)
+{
+ static const pthread_once_t once_init = PTHREAD_ONCE_INIT;
+
+ *control = apr_palloc(p, sizeof(**control));
+ (*control)->once = once_init;
+ return APR_SUCCESS;
+}
+
+APR_DECLARE(apr_status_t) apr_thread_once(apr_thread_once_t *control,
+ void (*func)(void))
+{
+ return pthread_once(&control->once, func);
+}
+
+APR_POOL_IMPLEMENT_ACCESSOR(thread)
+
+#endif /* HAVE_PTHREAD_H */
+#endif /* APR_HAS_THREADS */
+
+#if !APR_HAS_THREADS
+
+/* avoid warning for no prototype */
+APR_DECLARE(apr_status_t) apr_os_thread_get(void);
+
+APR_DECLARE(apr_status_t) apr_os_thread_get(void)
+{
+ return APR_ENOTIMPL;
+}
+
+#endif
Propchange: incubator/harmony/enhanced/drlvm/trunk/build/patches/lnx/APR/threadproc/unix/thread.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/drlvm/trunk/build/patches/win/APR/include/arch/win32/apr_arch_thread_cond.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/build/patches/win/APR/include/arch/win32/apr_arch_thread_cond.h?rev=434076&view=auto
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/build/patches/win/APR/include/arch/win32/apr_arch_thread_cond.h (added)
+++ incubator/harmony/enhanced/drlvm/trunk/build/patches/win/APR/include/arch/win32/apr_arch_thread_cond.h Wed Aug 23 09:48:41 2006
@@ -0,0 +1,33 @@
+/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef THREAD_COND_H
+#define THREAD_COND_H
+
+#include "apr_thread_cond.h"
+
+struct apr_thread_cond_t {
+ apr_pool_t *pool;
+ HANDLE event;
+ int signal_all;
+ int num_waiting;
+ int signalled;
+ unsigned wait_level;
+ unsigned notify_level;
+};
+
+#endif /* THREAD_COND_H */
+
Propchange: incubator/harmony/enhanced/drlvm/trunk/build/patches/win/APR/include/arch/win32/apr_arch_thread_cond.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/harmony/enhanced/drlvm/trunk/build/patches/win/APR/locks/win32/thread_cond.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/build/patches/win/APR/locks/win32/thread_cond.c?rev=434076&view=auto
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/build/patches/win/APR/locks/win32/thread_cond.c (added)
+++ incubator/harmony/enhanced/drlvm/trunk/build/patches/win/APR/locks/win32/thread_cond.c Wed Aug 23 09:48:41 2006
@@ -0,0 +1,152 @@
+/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "apr.h"
+#include "apr_private.h"
+#include "apr_general.h"
+#include "apr_strings.h"
+#include "win32/apr_arch_thread_mutex.h"
+#include "win32/apr_arch_thread_cond.h"
+#include "apr_portable.h"
+
+static apr_status_t thread_cond_cleanup(void *data)
+{
+ apr_thread_cond_t *cond = data;
+ CloseHandle(cond->event);
+ return APR_SUCCESS;
+}
+
+APR_DECLARE(apr_status_t) apr_thread_cond_create(apr_thread_cond_t **cond,
+ apr_pool_t *pool)
+{
+ *cond = apr_palloc(pool, sizeof(**cond));
+ (*cond)->pool = pool;
+ (*cond)->event = CreateEvent(NULL, TRUE, FALSE, NULL);
+ (*cond)->signal_all = 0;
+ (*cond)->num_waiting = 0;
+
+ (*cond)->wait_level = 0;
+ (*cond)->notify_level = 0;
+
+ return APR_SUCCESS;
+}
+// this is used to skip staled notifies,
+// ingnor notify that arrived before wait, V VVVVV - int overflow check.
+#define NOT_STALED(wait,notify) (wait<=notify || (wait > 0x4fffffff && notify < 0xffffff))
+
+static APR_INLINE apr_status_t _thread_cond_timedwait(apr_thread_cond_t *cond,
+ apr_thread_mutex_t *mutex,
+ DWORD timeout_ms )
+{
+ DWORD res;
+ unsigned this_wait_level;
+
+ cond->wait_level++;
+ this_wait_level=cond->wait_level;
+
+ while (1) {
+ cond->num_waiting++;
+ apr_thread_mutex_unlock(mutex);
+ res = WaitForSingleObject(cond->event, timeout_ms);
+ apr_thread_mutex_lock(mutex);
+ cond->num_waiting--;
+ if (res != WAIT_OBJECT_0) {
+ apr_status_t rv = apr_get_os_error();
+ if (res == WAIT_TIMEOUT) {
+ return APR_TIMEUP;
+ }
+ return apr_get_os_error();
+ }
+ if (cond->signal_all) {
+ if (cond->num_waiting == 0) {
+ cond->signal_all = 0;
+ cond->signalled = 0;
+ ResetEvent(cond->event);
+ }
+
+ // wait till all NOT_STALLED wait procceed and reset the event
+ // then continue waiting
+ while (!NOT_STALED(this_wait_level, cond->notify_level) && cond->num_waiting != 0) {
+ apr_thread_mutex_unlock(mutex);
+ apr_thread_yield();
+ apr_thread_mutex_lock(mutex);
+ }
+
+ if(NOT_STALED(this_wait_level, cond->notify_level)) {
+ break;
+ }
+
+ }
+ else if (cond->signalled && NOT_STALED(this_wait_level, cond->notify_level)) {
+ cond->signalled = 0;
+ ResetEvent(cond->event);
+ break;
+ }
+ }
+ return APR_SUCCESS;
+}
+
+APR_DECLARE(apr_status_t) apr_thread_cond_wait(apr_thread_cond_t *cond,
+ apr_thread_mutex_t *mutex)
+{
+ return _thread_cond_timedwait(cond, mutex, INFINITE);
+}
+
+APR_DECLARE(apr_status_t) apr_thread_cond_timedwait(apr_thread_cond_t *cond,
+ apr_thread_mutex_t *mutex,
+ apr_interval_time_t timeout)
+{
+ DWORD timeout_ms = (DWORD) apr_time_as_msec(timeout);
+
+ return _thread_cond_timedwait(cond, mutex, timeout_ms);
+}
+
+APR_DECLARE(apr_status_t) apr_thread_cond_signal(apr_thread_cond_t *cond)
+{
+ apr_status_t rv = APR_SUCCESS;
+ DWORD res;
+
+ cond->signalled = 1;
+ cond->notify_level = cond->wait_level;
+ res = SetEvent(cond->event);
+ if (res == 0) {
+ rv = apr_get_os_error();
+ }
+ return rv;
+}
+
+APR_DECLARE(apr_status_t) apr_thread_cond_broadcast(apr_thread_cond_t *cond)
+{
+ apr_status_t rv = APR_SUCCESS;
+ DWORD res;
+
+ cond->signalled = 1;
+ cond->signal_all = 1;
+ cond->notify_level = cond->wait_level;
+ res = SetEvent(cond->event);
+ if (res == 0) {
+ rv = apr_get_os_error();
+ }
+ return rv;
+}
+
+APR_DECLARE(apr_status_t) apr_thread_cond_destroy(apr_thread_cond_t *cond)
+{
+ return apr_pool_cleanup_run(cond->pool, cond, thread_cond_cleanup);
+}
+
+APR_POOL_IMPLEMENT_ACCESSOR(thread_cond)
+
Propchange: incubator/harmony/enhanced/drlvm/trunk/build/patches/win/APR/locks/win32/thread_cond.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.cpp?rev=434076&r1=434075&r2=434076&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.cpp Wed Aug 23 09:48:41 2006
@@ -100,6 +100,7 @@
nMethodsCompiled=0;
nMethodsRecompiled=0;
tick=0;
+ hymutex_create(&recompilationLock, TM_MUTEX_NESTED);
#ifndef _EM64T_
initProfileAccess();
#endif
@@ -107,6 +108,7 @@
DrlEMImpl::~DrlEMImpl() {
deallocateResources();
+ hymutex_destroy(recompilationLock);
}
void DrlEMImpl::initProfileAccess() {
@@ -628,15 +630,15 @@
void DrlEMImpl::methodProfileIsReady(MethodProfile* mp) {
- recompilationLock.lock();
+ hymutex_lock(recompilationLock);
if (methodsInRecompile.find((Method_Profile_Handle)mp)!=methodsInRecompile.end()) {
//method is already recompiling by another thread or by this thread(recursion)
- recompilationLock.unlock();
+ hymutex_unlock(recompilationLock);
return;
}
methodsInRecompile.insert((Method_Profile_Handle)mp);
nMethodsRecompiled++;
- recompilationLock.unlock();
+ hymutex_unlock(recompilationLock);
const char* methodName = NULL;
const char* className = NULL;
@@ -677,9 +679,9 @@
}
}
}
- recompilationLock.lock();
+ hymutex_lock(recompilationLock);
methodsInRecompile.erase((Method_Profile_Handle)mp);
- recompilationLock.unlock();
+ hymutex_unlock(recompilationLock);
}
ProfileCollector* DrlEMImpl::getProfileCollector(EM_PCTYPE type, JIT_Handle jh, EM_JIT_PC_Role jitRole) const {
Modified: incubator/harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.h?rev=434076&r1=434075&r2=434076&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.h (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.h Wed Aug 23 09:48:41 2006
@@ -125,7 +125,7 @@
uint32 tick;
- CriticalSection recompilationLock;
+ hymutex_t recompilationLock;
std::set<Method_Profile_Handle> methodsInRecompile;
};
Modified: incubator/harmony/enhanced/drlvm/trunk/vm/em/src/EBProfileCollector.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/em/src/EBProfileCollector.cpp?rev=434076&r1=434075&r2=434076&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/em/src/EBProfileCollector.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/em/src/EBProfileCollector.cpp Wed Aug 23 09:48:41 2006
@@ -50,6 +50,8 @@
<<" mode:"<<(mode == EB_PCMODE_ASYNC? "ASYNC": "SYNC");
INFO2(catName.c_str(), msg.str().c_str());
}
+
+ hymutex_create(&profilesLock, TM_MUTEX_NESTED);
}
Method_Profile_Handle eb_profiler_create_profile(PC_Handle ph, Method_Handle mh) {
@@ -108,6 +110,8 @@
EBMethodProfile* profile = it->second;
delete profile;
}
+
+ hymutex_destroy(profilesLock);
}
MethodProfile* EBProfileCollector::getMethodProfile(Method_Handle mh) const {
@@ -121,7 +125,7 @@
EBMethodProfile* EBProfileCollector::createProfile(Method_Handle mh) {
EBMethodProfile* profile = new EBMethodProfile(this, mh);
- profilesLock.lock();
+ hymutex_lock(profilesLock);
assert(profilesByMethod.find(mh) == profilesByMethod.end());
profilesByMethod[mh] = profile;
@@ -129,7 +133,7 @@
newProfiles.push_back(profile);
}
- profilesLock.unlock();
+ hymutex_unlock(profilesLock);
return profile;
}
@@ -150,10 +154,10 @@
void EBProfileCollector::onTimeout() {
assert(mode == EB_PCMODE_ASYNC);
if(!newProfiles.empty()) {
- profilesLock.lock();
+ hymutex_lock(profilesLock);
greenProfiles.insert(greenProfiles.end(), newProfiles.begin(), newProfiles.end());
newProfiles.clear();
- profilesLock.unlock();
+ hymutex_unlock(profilesLock);
}
for (std::vector<EBMethodProfile*>::iterator it = greenProfiles.begin(), end = greenProfiles.end(); it!=end; ++it) {
Modified: incubator/harmony/enhanced/drlvm/trunk/vm/em/src/EBProfileCollector.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/em/src/EBProfileCollector.h?rev=434076&r1=434075&r2=434076&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/em/src/EBProfileCollector.h (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/em/src/EBProfileCollector.h Wed Aug 23 09:48:41 2006
@@ -87,7 +87,7 @@
// preallocated mem for temporary (method-local) needs
std::vector<EBMethodProfile*> tmpProfiles;
- CriticalSection profilesLock;
+ hymutex_t profilesLock;
};
class EBMethodProfile : public MethodProfile {
Modified: incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/block_store.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/block_store.cpp?rev=434076&r1=434075&r2=434076&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/block_store.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/block_store.cpp Wed Aug 23 09:48:41 2006
@@ -345,7 +345,7 @@
while (apr_atomic_casptr((volatile void **)&block_store_lock,
(void *)1, (void *)0) == (void *)1) {
while (block_store_lock == (void *)1) {
- Sleep(1);
+ hythread_yield();
}
}
}
Modified: incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/garbage_collector.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/garbage_collector.h?rev=434076&r1=434075&r2=434076&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/garbage_collector.h (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/garbage_collector.h Wed Aug 23 09:48:41 2006
@@ -28,6 +28,7 @@
// Portlib interface header files
#include "port_atomic.h"
+#include "open/hythread_ext.h"
// GC header files
#include "hash_table.h"
@@ -483,7 +484,7 @@
// set of blocks that contain at least one pinned root
std::set<block_info*> m_pinned_blocks;
- HANDLE *_gc_thread_work_finished_event_handles;
+ hysem_t *_gc_thread_work_finished_event_handles;
Work_Packet_Manager *_mark_scan_pool;
Modified: incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/gc_header.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/gc_header.h?rev=434076&r1=434075&r2=434076&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/gc_header.h (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/gc_header.h Wed Aug 23 09:48:41 2006
@@ -29,6 +29,7 @@
#include "open/vm_gc.h"
#include "open/vm.h"
#include "gc_cout.h"
+#include "open/hythread_ext.h"
#include "hash_table.h"
//
@@ -578,7 +579,7 @@
// we still haven't got the lock
// spin & yield until we grabbed the lock
while (apr_atomic_cas32((volatile uint32 *)lock, 1, 0) == 1) {
- Sleep(1);
+ hythread_yield();
}
}
}
Modified: incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/gc_thread.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/gc_thread.h?rev=434076&r1=434075&r2=434076&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/gc_thread.h (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/gc_thread.h Wed Aug 23 09:48:41 2006
@@ -25,6 +25,7 @@
#include "gc_cout.h"
#include "faststack.h"
#include "work_packet_manager.h"
+#include "open/hythread_ext.h"
class Garbage_Collector;
@@ -107,7 +108,7 @@
public:
- GC_Thread(Garbage_Collector *, pthread_t);
+ GC_Thread(Garbage_Collector *, int);
virtual ~GC_Thread();
@@ -125,15 +126,15 @@
_task_to_do = task;
}
- VmThreadHandle get_thread_handle() {
+ hythread_t get_thread_handle() {
return _thread_handle;
}
- inline HANDLE get_gc_thread_work_done_event_handle() {
+ inline hysem_t get_gc_thread_work_done_event_handle() {
return _gc_thread_work_done_event;
}
- inline HANDLE get_gc_thread_start_work_event_handle() {
+ inline hysem_t get_gc_thread_start_work_event_handle() {
return _gc_thread_start_work_event;
}
@@ -200,13 +201,11 @@
#ifdef _DEBUG
chunk_sweep_stats _sweep_stats[GC_MAX_CHUNKS];
#endif
- VmThreadHandle _thread_handle;
+ hythread_t _thread_handle;
- pthread_t _thread_id;
+ hysem_t _gc_thread_start_work_event;
- HANDLE _gc_thread_start_work_event;
-
- HANDLE _gc_thread_work_done_event;
+ hysem_t _gc_thread_work_done_event;
gc_thread_action _task_to_do;
Modified: incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/gc_threads.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/gc_threads.cpp?rev=434076&r1=434075&r2=434076&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/gc_threads.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/gc/src/gc_threads.cpp Wed Aug 23 09:48:41 2006
@@ -62,8 +62,7 @@
extern bool sweeps_during_gc;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-unsigned int __stdcall gc_thread_func (void *);
-
+int __cdecl gc_thread_func (void *arg);
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
GC_Mark_Activity::GC_Mark_Activity(Garbage_Collector *p_gc) {
@@ -88,7 +87,17 @@
assert(_input_packet == NULL);
}
-GC_Thread::GC_Thread(Garbage_Collector *p_gc, pthread_t gc_thread_id)
+
+hythread_group_t gc_thread_group = NULL;
+hythread_group_t get_thread_group () {
+ if (!gc_thread_group) {
+ IDATA UNUSED stat = hythread_group_create(&gc_thread_group);
+ assert(stat == TM_ERROR_NONE);
+ }
+ return gc_thread_group;
+}
+
+GC_Thread::GC_Thread(Garbage_Collector *p_gc, int gc_thread_id)
: GC_Mark_Activity(p_gc)
{
@@ -106,37 +115,15 @@
}
//////////////////
- _gc_thread_start_work_event = CreateEvent(
- NULL, // pointer to security attributes
- FALSE, // flag for manual-reset event -- auto reset mode
- FALSE, // flag for initial state
- NULL // pointer to event-object name
- );
- assert(_gc_thread_start_work_event);
- Boolean rstat = ResetEvent(_gc_thread_start_work_event);
- assert(rstat);
-
+ IDATA stat = hysem_create(&_gc_thread_start_work_event, 0, 1);
+ assert(stat == TM_ERROR_NONE);
//////////////////
- _gc_thread_work_done_event = CreateEvent(
- NULL, // pointer to security attributes
- FALSE, // flag for manual-reset event -- auto reset mode
- FALSE, // flag for initial state
- NULL // pointer to event-object name
- );
- assert(_gc_thread_work_done_event);
-
- rstat = ResetEvent(_gc_thread_work_done_event);
- assert(rstat);
-
- _thread_handle = vm_beginthreadex(NULL,
- 0,
- gc_thread_func,
- (LPVOID) this,
- 0,
- &(_thread_id));
-
- if (!_thread_handle) {
+ stat = hysem_create(&_gc_thread_work_done_event, 0, 1);
+ assert(stat == TM_ERROR_NONE);
+ _thread_handle=NULL;
+ stat = hythread_create_with_group(&_thread_handle, get_thread_group(), 0, 0, 0, gc_thread_func, this);
+ if (stat != TM_ERROR_NONE) {
DIE("GC_Thread::GC_Thread(..): CreateThread() failed...exiting...");
}
@@ -151,8 +138,8 @@
GC_Thread::~GC_Thread()
{
- vm_destroy_event(_gc_thread_start_work_event);
- vm_destroy_event(_gc_thread_work_done_event);
+ hysem_destroy(_gc_thread_start_work_event);
+ hysem_destroy(_gc_thread_work_done_event);
}
@@ -170,10 +157,10 @@
#endif
}
- Boolean rstat = ResetEvent(_gc_thread_start_work_event);
- assert(rstat);
- rstat = ResetEvent(_gc_thread_work_done_event);
- assert(rstat);
+ IDATA rstat = hysem_set(_gc_thread_start_work_event,0);
+ assert(rstat == TM_ERROR_NONE);
+ rstat = hysem_set(_gc_thread_work_done_event,0);
+ assert(rstat == TM_ERROR_NONE);
_num_bytes_recovered_by_sweep = 0;
////////////////////////////////
@@ -187,8 +174,8 @@
void
GC_Thread::wait_for_work()
{
- DWORD UNUSED wstat = WaitForSingleObject(_gc_thread_start_work_event, INFINITE);
- assert(wstat != WAIT_FAILED);
+ IDATA UNUSED wstat = hysem_wait(_gc_thread_start_work_event);
+ assert(wstat == TM_ERROR_NONE);
}
@@ -197,15 +184,15 @@
GC_Thread::signal_work_is_done()
{
// I am done with my job. SIGNAL MASTER THREAD
- Boolean UNUSED sstat = SetEvent(_gc_thread_work_done_event);
- assert(sstat);
+ IDATA UNUSED sstat = hysem_post(_gc_thread_work_done_event);
+ assert(sstat == TM_ERROR_NONE);
}
volatile POINTER_SIZE_INT dummy_for_good_cache_performance = 0;
-unsigned int __stdcall gc_thread_func (void *arg)
+int __cdecl gc_thread_func (void *arg)
{
GC_Thread *p_gc_thread = (GC_Thread *) arg;
assert(p_gc_thread);