harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r428149 - in /incubator/harmony/enhanced/drlvm/trunk: build/make/components/vm/hythr.xml vm/vmcore/src/thread/hythr/hythr.def vm/vmcore/src/thread/hythr/hythr.exp vm/vmcore/src/thread/hythr/hythreads.cpp vm/vmcore/src/thread/hythr/hythreads.h
Date Wed, 02 Aug 2006 21:06:55 GMT
Author: geirm
Date: Wed Aug  2 14:06:54 2006
New Revision: 428149

URL: http://svn.apache.org/viewvc?rev=428149&view=rev
Log:
HARMONY-926

Make necessary fixes to threading so that we can work
with launcher.  In theory, we're good to go with the 
launcher.

Modified:
    incubator/harmony/enhanced/drlvm/trunk/build/make/components/vm/hythr.xml
    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

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=428149&r1=428148&r2=428149&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  2 14:06:54
2006
@@ -27,7 +27,7 @@
 
 <project name="vm.hythr">
     <target name="init" depends="common_vm">
-        <property name="build.depends" value="extra.apr,vm.vmcore" />
+        <property name="build.depends" value="extra.apr,extra.aprutil" />
         <property name="libname" value="hythr" />
         <property name="outtype" value="shared" />
         <property name="src" location="${build.vm.home}" />
@@ -62,7 +62,7 @@
             </select>
 
             <select os="win">
-                <defineset define="_USRDLL" />
+                <defineset define="_USRDLL,APR_DECLARE_STATIC" />
             </select>
 
             <select os="lnx">
@@ -90,8 +90,10 @@
                 <linkerarg value="-Wl,--version-script,${src}/vmcore/src/thread/hythr/hythr.exp"
/>
             </select>
 
+            <libset libs="${extra.apr.lib}"
+                    dir="${extra.apr.libdir}" />
+
             <select os="win">
-                <libset libs="${vm.vmcore.lib}" dir="${vm.vmcore.libdir}" />
                 <syslibset libs="advapi32,ws2_32" />
             </select>
         </linker>

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/hythr/hythr.def
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/hythr/hythr.def?rev=428149&r1=428148&r2=428149&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/hythr/hythr.def (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/hythr/hythr.def Wed Aug  2
14:06:54 2006
@@ -1,21 +1,22 @@
 LIBRARY	HYTHR
 
 EXPORTS
-	hythread_monitor_init_with_name 
-	hythread_monitor_destroy 
-	hythread_monitor_try_enter 
-	hythread_monitor_enter
-	hythread_monitor_notify_all 
-	hythread_attach 
-	hythread_create 
-	hythread_detach 
-	hythread_global
-        hythread_self
-	hythread_tls_alloc
-	hythread_tls_free 
-	hythread_tls_set 
-
-        hythread_monitor_wait
-        hythread_monitor_exit
-	hythread_tls_get
+       hythread_attach
+       hythread_create
+       hythread_detach
+       hythread_exit
+       hythread_global
+       hythread_monitor_destroy
+       hythread_monitor_enter
+       hythread_monitor_exit
+       hythread_monitor_init_with_name
+       hythread_monitor_notify
+       hythread_monitor_notify_all
+       hythread_monitor_try_enter
+       hythread_monitor_wait
+       hythread_self
+       hythread_tls_alloc
+       hythread_tls_free
+       hythread_tls_get
+       hythread_tls_set
  

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/hythr/hythr.exp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/hythr/hythr.exp?rev=428149&r1=428148&r2=428149&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/hythr/hythr.exp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/hythr/hythr.exp Wed Aug  2
14:06:54 2006
@@ -1,20 +1,22 @@
 HYTHR_0.1 {
-	global :
-	hythread_monitor_init_with_name;
-	hythread_monitor_destroy;
-	hythread_monitor_try_enter;
-	hythread_monitor_enter;
-	hythread_monitor_notify_all;
-	hythread_attach;
-	hythread_create;
-	hythread_detach;
-	hythread_global;
-        hythread_self;
-	hythread_tls_alloc;
-	hythread_tls_free;
-	hythread_tls_set;
-        hythread_monitor_wait;
-        hythread_monitor_exit;
-	hythread_tls_get;
-	local : *;
+    global :
+    hythread_attach;
+    hythread_create;
+    hythread_detach;
+    hythread_exit;
+    hythread_global;
+    hythread_monitor_destroy;
+    hythread_monitor_enter;
+    hythread_monitor_exit;
+    hythread_monitor_init_with_name;
+    hythread_monitor_notify;
+    hythread_monitor_notify_all;
+    hythread_monitor_try_enter;
+    hythread_monitor_wait;
+    hythread_self;
+    hythread_tls_alloc;
+    hythread_tls_free;
+    hythread_tls_get;
+    hythread_tls_set;
+    local : *;
 };

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/hythr/hythreads.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/hythr/hythreads.cpp?rev=428149&r1=428148&r2=428149&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/hythr/hythreads.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/hythr/hythreads.cpp Wed Aug
 2 14:06:54 2006
@@ -53,6 +53,7 @@
 // Will do all initilalization of thread library.
 // init global_monitor now.
 JNIEXPORT void  __cdecl hythread_init (void*  lib)  {
+    apr_initialize();
     hythread_monitor_init_with_name(&p_global_monitor, 0, "Thread Global Monitor");
     hythread_monitor_t *mon = (hythread_monitor_t*)hythread_global(GLOBAL_MONITOR_NAME);
     *mon = p_global_monitor;
@@ -118,6 +119,12 @@
     return 0; 
 }
 JNIEXPORT int __cdecl
+hythread_monitor_notify(hythread_monitor_t monitor){ 
+    apr_status_t stat = apr_thread_cond_signal(monitor->cond);
+    RET_ON_ERROR(stat)
+    return 0; 
+}
+JNIEXPORT int __cdecl
 hythread_monitor_notify_all (hythread_monitor_t monitor){ 
     apr_status_t stat = apr_thread_cond_broadcast(monitor->cond);
     RET_ON_ERROR(stat)
@@ -257,5 +264,27 @@
     RET_ON_ERROR(stat);
     return 0;
 }
+
+
+JNIEXPORT int __cdecl
+hythread_exit (hythread_monitor_t monitor) {
+   apr_status_t stat;
+   apr_os_thread_t aott;
+   apr_thread_t *att = NULL;
+
+   // att = (apr_thread_t*)apr_pcalloc(get_pool(), sizeof(apr_thread_t*));	
+   aott = apr_os_thread_current();
+   stat = apr_os_thread_put(&att, &aott, get_pool());
+   RET_ON_ERROR(stat);
+    
+   if (monitor) {
+      hythread_monitor_exit(monitor);
+   }
+
+   return apr_thread_exit(att, 0);
+}
+
+
+
 
 }// extern "C"

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/hythr/hythreads.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/hythr/hythreads.h?rev=428149&r1=428148&r2=428149&view=diff
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/hythr/hythreads.h (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/hythr/hythreads.h Wed Aug
 2 14:06:54 2006
@@ -51,6 +51,8 @@
 JNIEXPORT int __cdecl 
 hythread_monitor_exit (hythread_monitor_t monitor);
 JNIEXPORT int __cdecl
+hythread_monitor_notify (hythread_monitor_t monitor);
+JNIEXPORT int __cdecl
 hythread_monitor_notify_all (hythread_monitor_t monitor);
 JNIEXPORT int __cdecl
 hythread_monitor_wait (hythread_monitor_t monitor);
@@ -63,6 +65,8 @@
 JNIEXPORT void __cdecl 
 hythread_detach (hythread_t handle);
 JNIEXPORT hythread_t __cdecl hythread_self();
+JNIEXPORT int __cdecl
+hythread_exit (hythread_monitor_t monitor);
 
 JNIEXPORT unsigned* __cdecl 
 hythread_global (char* name);



Mime
View raw message