harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r589332 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp
Date Sun, 28 Oct 2007 11:05:26 GMT
Author: hindessm
Date: Sun Oct 28 04:05:25 2007
New Revision: 589332

URL: http://svn.apache.org/viewvc?rev=589332&view=rev
Log:
Partial fixes for FreeBSD.
Calling pthread_attr_init on Linux too since I believe it is also recommended
on that platform too.

Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp?rev=589332&r1=589331&r2=589332&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp Sun Oct 28 04:05:25
2007
@@ -46,6 +46,9 @@
 #include <signal.h>
 
 #include <pthread.h>
+#if defined(FREEBSD)
+#include <pthread_np.h>
+#endif
 #include <sys/time.h>
 #include "method_lookup.h"
 
@@ -240,7 +243,13 @@
     size_t stack_size;
 
     pthread_t thread = pthread_self();
+    err = pthread_attr_init(&pthread_attr);
+    assert(!err);
+#if defined(FREEBSD)
+    err = pthread_attr_get_np(thread, &pthread_attr);
+#else
     err = pthread_getattr_np(thread, &pthread_attr);
+#endif
     assert(!err);
     err = pthread_attr_getstack(&pthread_attr, &stack_addr, &stack_size);
     assert(!err);
@@ -321,7 +330,7 @@
 
     
     common_guard_stack_size = find_guard_stack_size();
-    common_guard_page_size =find_guard_page_size();
+    common_guard_page_size = find_guard_page_size();
 
     // stack should be mapped so it's result of future mapping
     char* res;



Mime
View raw message