harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arc...@apache.org
Subject svn commit: r356536 - in /incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc: interp.c thread.c
Date Tue, 13 Dec 2005 16:48:43 GMT
Author: archie
Date: Tue Dec 13 08:48:40 2005
New Revision: 356536

URL: http://svn.apache.org/viewcvs?rev=356536&view=rev
Log:
Remove some unused and no longer needed code.

Modified:
    incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/interp.c
    incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/thread.c

Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/interp.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/interp.c?rev=356536&r1=356535&r2=356536&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/interp.c (original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/interp.c Tue Dec
13 08:48:40 2005
@@ -98,10 +98,6 @@
 		goto exception;						\
 	}								\
     } while (0)
-#define _JC_INTERP_PRIM_ELEM(type, array, i)				\
-	(((_jc_ ## type ## _array *)(array))->elems[(i)])
-#define _JC_INTERP_REF_ELEM(array, i)					\
-	(((_jc_object_array *)(array))->elems[~(i)])
 
 #define PERIODIC_CHECK_TICKS	32
 

Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/thread.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/thread.c?rev=356536&r1=356535&r2=356536&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/thread.c (original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc/thread.c Tue Dec
13 08:48:40 2005
@@ -27,10 +27,6 @@
 static void		_jc_set_current_env(_jc_jvm *vm, _jc_env *env);
 static void		_jc_thread_suspend(_jc_env *env);
 
-#ifdef __linux__
-static void		_jc_touch_stack(const char *start, const char *current);
-#endif
-
 /*
  * Initialize threading.
  */
@@ -634,11 +630,6 @@
 	if ((env = _jc_allocate_thread(&temp_env)) == NULL)
 		goto fail;
 
-#ifdef __linux__
-	/* Make sure the stack is really there */
-	_jc_touch_stack((const char *)&vm, (const char *)&vm);
-#endif
-
 	/* Remember that this thread structure goes with the current thread */
 	_jc_set_current_env(vm, env);
 
@@ -1069,35 +1060,4 @@
 	_jc_free_global_native_ref(&ref);
 	return NULL;
 }
-
-#ifdef __linux__
-
-/*
- * Linux has an (arguable) bug whereby you get a segfault if you touch
- * otherwise valid stack memory that is too far past the current stack
- * pointer if those pages are not yet faulted into memory. This causes
- * our _JC_STACK_OVERFLOW_CHECK() macro to segfault way too early.
- * So for threads attached natively, we touch all pages in the expected
- * stack usage range to avoid this problem.
- */
-static void
-_jc_touch_stack(const char *const start, const char *current)
-{
-	const size_t max = strtoul(_JC_STACK_DEFAULT, NULL, 10);
-	char buf[1024];		/* surely smaller than one page */
-	size_t diff;
-
-	/* Get current stack depth */
-#if _JC_DOWNWARD_STACK
-	diff = start - current;
-#else
-	diff = current - start;
-#endif
-
-	/* Continue until we touch all of it */
-	if (diff < max - 1024)
-		_jc_touch_stack(start, buf);
-}
-
-#endif
 



Mime
View raw message