harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r988320 - in /harmony/enhanced/java/branches/java6: ./ classlib/ classlib/depends/libs/ drlvm/ drlvm/vm/port/src/thread/linux/thread_os.c jdktools/
Date Mon, 23 Aug 2010 21:39:26 GMT
Author: hindessm
Date: Mon Aug 23 21:39:25 2010
New Revision: 988320

URL: http://svn.apache.org/viewvc?rev=988320&view=rev
Log:
Merge change from /harmony/enhanced/java/trunk@987283:

  r987283 | iberezhn | 2010-08-19 20:50:19 +0100 (Thu, 19 Aug 2010) | 1 line
  
  Fixed thread start failures when libthr reuses threads on FreeBSD


Modified:
    harmony/enhanced/java/branches/java6/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/depends/libs/   (props changed)
    harmony/enhanced/java/branches/java6/drlvm/   (props changed)
    harmony/enhanced/java/branches/java6/drlvm/vm/port/src/thread/linux/thread_os.c
    harmony/enhanced/java/branches/java6/jdktools/   (props changed)

Propchange: harmony/enhanced/java/branches/java6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Aug 23 21:39:25 2010
@@ -1,4 +1,4 @@
 /harmony/enhanced/java/branches/mrh:935751-941490
-/harmony/enhanced/java/trunk:929253-979569,979593,979613,979615,979647,979659,979682,979897,980326,980632,981356,981763,981811,981820,982146,982148,982183,982250,982377,982498,982614,982650,982777,982887,983879,983902,984367,984577,984597-984598,984613,984682,984708,984731,984779,984784,984798,985098,985141,986136,986141,986147,986150,986205,986223-986224,986228,986248,986356,986603,986626
+/harmony/enhanced/java/trunk:929253-979569,979593,979613,979615,979647,979659,979682,979897,980326,980632,981356,981763,981811,981820,982146,982148,982183,982250,982377,982498,982614,982650,982777,982887,983879,983902,984367,984577,984597-984598,984613,984682,984708,984731,984779,984784,984798,985098,985141,986136,986141,986147,986150,986205,986223-986224,986228,986248,986356,986603,986626,987283
 /harmony/enhanced/trunk:476395-929252
 /incubator/harmony/enhanced/trunk:292550-476394

Propchange: harmony/enhanced/java/branches/java6/classlib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Aug 23 21:39:25 2010
@@ -1,7 +1,7 @@
 /harmony/enhanced/classlib/trunk:713674-735919,765923-926091,926318-926838
 /harmony/enhanced/classlib/trunk/working_classlib:884014-884286
 /harmony/enhanced/java/branches/mrh/classlib:935751-941490
-/harmony/enhanced/java/trunk/classlib:929253-979569,979593,979613,979615,979647,979659,979682,979897,980326,980632,981356,981763,981811,981820,982146,982148,982183,982250,982377,982498,982614,982650,982777,982887,983879,983902,984367,984577,984597-984598,984613,984682,984708,984731,984779,984784,984798,985098,985141,986136,986141,986147,986150,986205,986223-986224,986228,986248,986356,986603,986626
+/harmony/enhanced/java/trunk/classlib:929253-979569,979593,979613,979615,979647,979659,979682,979897,980326,980632,981356,981763,981811,981820,982146,982148,982183,982250,982377,982498,982614,982650,982777,982887,983879,983902,984367,984577,984597-984598,984613,984682,984708,984731,984779,984784,984798,985098,985141,986136,986141,986147,986150,986205,986223-986224,986228,986248,986356,986603,986626,987283
 /harmony/enhanced/trunk/classlib:476395-929252
 /harmony/enhanced/trunk/working_classlib:476396-920147
 /incubator/harmony/enhanced/trunk/classlib:292550-476394

Propchange: harmony/enhanced/java/branches/java6/classlib/depends/libs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Aug 23 21:39:25 2010
@@ -1,4 +1,4 @@
 /harmony/enhanced/classlib/trunk/depends/libs:544451-926091
-/harmony/enhanced/java/trunk/classlib/depends/libs:929253-979569,979593,979613,979615,979647,979659,979682,979897,980326,980632,981356,981763,981811,981820,982146,982148,982183,982250,982377,982498,982614,982650,982777,982887,983879,983902,984367,984577,984597-984598,984613,984682,984708,984731,984779,984784,984798,985098,985141,986136,986141,986147,986150,986205,986223-986224,986228,986248,986356,986603,986626
+/harmony/enhanced/java/trunk/classlib/depends/libs:929253-979569,979593,979613,979615,979647,979659,979682,979897,980326,980632,981356,981763,981811,981820,982146,982148,982183,982250,982377,982498,982614,982650,982777,982887,983879,983902,984367,984577,984597-984598,984613,984682,984708,984731,984779,984784,984798,985098,985141,986136,986141,986147,986150,986205,986223-986224,986228,986248,986356,986603,986626,987283
 /harmony/enhanced/trunk/classlib/depends/libs:476395-929252
 /incubator/harmony/enhanced/trunk/classlib/depends/libs:292550-476394

Propchange: harmony/enhanced/java/branches/java6/drlvm/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Aug 23 21:39:25 2010
@@ -1,5 +1,5 @@
 /harmony/enhanced/java/branches/mrh/drlvm:935751-941490
-/harmony/enhanced/java/trunk/drlvm:929253-979569,979593,979613,979615,979647,979659,979682,979897,980326,980632,981356,981763,981811,981820,982146,982148,982183,982250,982377,982498,982614,982650,982777,982887,983879,983902,984367,984577,984597-984598,984613,984682,984708,984731,984779,984784,984798,985098,985141,986136,986141,986147,986150,986205,986223-986224,986228,986248,986356,986603,986626
+/harmony/enhanced/java/trunk/drlvm:929253-979569,979593,979613,979615,979647,979659,979682,979897,980326,980632,981356,981763,981811,981820,982146,982148,982183,982250,982377,982498,982614,982650,982777,982887,983879,983902,984367,984577,984597-984598,984613,984682,984708,984731,984779,984784,984798,985098,985141,986136,986141,986147,986150,986205,986223-986224,986228,986248,986356,986603,986626,987283
 /harmony/enhanced/trunk/drlvm:476395-929252
 /harmony/enhanced/trunk/working_vm:476396-920147
 /incubator/harmony/enhanced/trunk/drlvm:292550-476394

Modified: harmony/enhanced/java/branches/java6/drlvm/vm/port/src/thread/linux/thread_os.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/drlvm/vm/port/src/thread/linux/thread_os.c?rev=988320&r1=988319&r2=988320&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/drlvm/vm/port/src/thread/linux/thread_os.c (original)
+++ harmony/enhanced/java/branches/java6/drlvm/vm/port/src/thread/linux/thread_os.c Mon Aug
23 21:39:25 2010
@@ -226,7 +226,10 @@ int set_alt_stack(port_tls_data_t* tlsda
 //#else
 //    sigalt.ss_flags = set ? SS_ONSTACK : SS_DISABLE;
 //#endif
-    return sigaltstack(&sigalt, NULL);
+    if (sigaltstack(&sigalt, NULL) != 0)
+        return errno;
+
+    return 0;
 }
 
 static int set_guard_page(port_tls_data_t* tlsdata, Boolean set)
@@ -257,7 +260,7 @@ static int set_guard_page(port_tls_data_
         res = set_alt_stack(tlsdata, TRUE);
 
         if (res != 0)
-            return errno;
+            return res;
     }
 
     tlsdata->guard_page_set = set;
@@ -317,17 +320,17 @@ static int setup_stack(port_tls_data_t* 
     int res;
     void* ptr;
     stack_t sigalt;
-    size_t current_page_addr, mapping_addr, mapping_size;
+    size_t /*current_page_addr,*/ mapping_addr, mapping_size;
 
     if (!port_shared_data)
         return -1;
 
-    current_page_addr = ((size_t)&res) & ~(PSD->guard_page_size - 1);
+//    current_page_addr = ((size_t)&res) & ~(PSD->guard_page_size - 1);
     // leave place for mmap work
-    mapping_addr = current_page_addr - PSD->guard_page_size;
+//    mapping_addr = current_page_addr - PSD->guard_page_size;
     // found size of the stack area which should be maped
-    mapping_size = tlsdata->stack_size
-            - ((size_t)tlsdata->stack_addr - mapping_addr);
+//    mapping_size = tlsdata->stack_size
+//            - ((size_t)tlsdata->stack_addr - mapping_addr);
 
     if ((size_t)(&res) - PSD->mem_protect_size
             < (size_t)tlsdata->guard_page_addr + tlsdata->guard_page_size)
@@ -347,7 +350,7 @@ static int setup_stack(port_tls_data_t* 
     res = set_guard_page(tlsdata, TRUE);
 
     if (res != 0)
-        return errno;
+        return res;
 
     return 0;
 }
@@ -493,6 +496,12 @@ int port_thread_detach()
     if (res != 0)
         return res;
 
+    size_t mapping_addr = (size_t)tlsdata->stack_addr - tlsdata->stack_size;
+    size_t mapping_size =
+        (tlsdata->guard_stack_size + tlsdata->mem_protect_size + 2*PSD->guard_page_size
- 1) &
+            ~(PSD->guard_page_size - 1);
+    munmap((void*)mapping_addr, mapping_size);
+
     if (tlsdata->foreign)
         STD_FREE(tlsdata);
 

Propchange: harmony/enhanced/java/branches/java6/jdktools/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Aug 23 21:39:25 2010
@@ -1,4 +1,4 @@
-/harmony/enhanced/java/trunk/jdktools:929253-979569,979593,979613,979615,979647,979659,979682,979897,980326,980632,981356,981763,981811,981820,982146,982148,982183,982250,982377,982498,982614,982650,982777,982887,983879,983902,984367,984577,984597-984598,984613,984682,984708,984731,984779,984784,984798,985098,985141,986136,986141,986147,986150,986205,986223-986224,986228,986248,986356,986603,986626
+/harmony/enhanced/java/trunk/jdktools:929253-979569,979593,979613,979615,979647,979659,979682,979897,980326,980632,981356,981763,981811,981820,982146,982148,982183,982250,982377,982498,982614,982650,982777,982887,983879,983902,984367,984577,984597-984598,984613,984682,984708,984731,984779,984784,984798,985098,985141,986136,986141,986147,986150,986205,986223-986224,986228,986248,986356,986603,986626,987283
 /harmony/enhanced/jdktools/trunk:630107-925933
 /harmony/enhanced/trunk/jdktools:476395-929252
 /harmony/enhanced/trunk/working_jdktools:476396-920147



Mime
View raw message