[kaffe] CVS kaffe (guilhem): Fixes mix.
Kaffe CVS
cvs-commits at kaffe.org
Sun Jan 1 10:40:02 PST 2006
PatchSet 7069
Date: 2006/01/01 18:28:48
Author: guilhem
Branch: HEAD
Tag: (none)
Log:
Fixes mix.
* FAQ/FAQ.kaffemd: Added KAFFEMD_DISABLE_SETSTACKSIZE.
* config/alpha/trampolines.S: Use C comments instead of # to
avoid confusing the preprocessor.
* config/alpha/osf/jit-md.h
(__alpha_ra): Use uintp for the first param as implemented in
alpha.c.
Include gtypes.h for uintp.
* config/alpha/osf/config.frag: Disable the use of mdSetStackSize
because OSF has a weird behaviour.
* kaffe/kaffevm/thread.c
(initNativeThreads): If DISABLE_KAFFEMD_SETSTACKSIZE is set we do
not set the stack size limit of the current process.
* kaffe/kaffevm/systems/unix-pthreads/lock-impl.h
(jmutex_initialise, jcondvar_initialise): Fixed the testing of
_POSIX_THREAD_PROCESS_SHARED on alpha/osf.
* libraries/clib/native/Makefile.am: Use fdlibm from classpath tree.
* libraries/clib/native/Makefile.in: Regenerated.
* configure.ac: Handle more
precisely CFLAGS passed on the command line.
Members:
ChangeLog:1.4588->1.4589
configure:1.520->1.521
configure.ac:1.198->1.199
FAQ/FAQ.kaffemd:1.2->1.3
config/alpha/trampolines.S:1.3->1.4
config/alpha/osf/jit-md.h:1.7->1.8
config/alpha/osf/md.h:1.4->1.5
kaffe/kaffevm/thread.c:1.105->1.106
kaffe/kaffevm/systems/unix-pthreads/lock-impl.h:INITIAL->1.11
libraries/clib/native/Makefile.am:1.51->1.52
libraries/clib/native/Makefile.in:1.204->1.205
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4588 kaffe/ChangeLog:1.4589
--- kaffe/ChangeLog:1.4588 Sat Dec 31 00:31:36 2005
+++ kaffe/ChangeLog Sun Jan 1 18:28:48 2006
@@ -1,8 +1,38 @@
+2005-12-31 Guilhem Lavaux <guilhem at kaffe.org>
+
+ * FAQ/FAQ.kaffemd: Added KAFFEMD_DISABLE_SETSTACKSIZE.
+
+ * config/alpha/trampolines.S: Use C comments instead of # to
+ avoid confusing the preprocessor.
+
+ * config/alpha/osf/jit-md.h
+ (__alpha_ra): Use uintp for the first param as implemented in
+ alpha.c.
+ Include gtypes.h for uintp.
+
+ * config/alpha/osf/config.frag: Disable the use of mdSetStackSize
+ because OSF has a weird behaviour.
+
+ * kaffe/kaffevm/thread.c
+ (initNativeThreads): If DISABLE_KAFFEMD_SETSTACKSIZE is set we do
+ not set the stack size limit of the current process.
+
+ * kaffe/kaffevm/systems/unix-pthreads/lock-impl.h
+ (jmutex_initialise, jcondvar_initialise): Fixed the testing of
+ _POSIX_THREAD_PROCESS_SHARED on alpha/osf.
+
+ * libraries/clib/native/Makefile.am: Use fdlibm from classpath tree.
+
+ * libraries/clib/native/Makefile.in: Regenerated.
+
+ * configure.ac: Handle more
+ precisely CFLAGS passed on the command line.
+
2005-12-31 Ito Kazumitsu <kaz at maczuka.gcd.org>
* tools/javatools/javalib/gnu/classpath/tools/native2ascii/Native2ASCII.java:
Copied from GNU Classpath (some bugs fixed).
-
+
2005-12-30 Guilhem Lavaux <guilhem at kaffe.org>
* config/config-std.h: Include config-int.h before everything
Index: kaffe/configure
diff -u kaffe/configure:1.520 kaffe/configure:1.521
--- kaffe/configure:1.520 Wed Dec 28 20:43:51 2005
+++ kaffe/configure Sun Jan 1 18:28:49 2006
@@ -49599,7 +49599,11 @@
CLASSPATH_INCLUDES="-I\$(top_srcdir)/libraries/clib/target/Linux -I\$(top_srcdir)/libraries/clib/target/generic"
-old_configure_args="$ac_configure_args"
+
+ac_configure_args=`echo "$ac_configure_args" | sed "s%'CFLAGS=.*'%%g"`
+ac_configure_args="$ac_configure_args 'CFLAGS=${CFLAGS}'"
+ac_cv_env_CFLAGS_value="${CFLAGS}"
+ac_cv_env_CFLAGS_set=set
# Preset the compiler to jikes, since GNU Classpath's default is gcj.
# Unfortunately, many gcj versions are incapable of compiling GNU
Index: kaffe/configure.ac
diff -u kaffe/configure.ac:1.198 kaffe/configure.ac:1.199
--- kaffe/configure.ac:1.198 Wed Dec 28 20:43:57 2005
+++ kaffe/configure.ac Sun Jan 1 18:28:51 2006
@@ -2348,7 +2348,13 @@
dnl -------------------------
dnl Update args for classpath
dnl -------------------------
-old_configure_args="$ac_configure_args"
+
+dnl First we remove eventually CFLAGS from the configure call.
+ac_configure_args=`echo "$ac_configure_args" | sed "s%'CFLAGS=.*'%%g"`
+dnl Then we add it again for config.status
+ac_configure_args="$ac_configure_args 'CFLAGS=${CFLAGS}'"
+ac_cv_env_CFLAGS_value="${CFLAGS}"
+ac_cv_env_CFLAGS_set=set
# Preset the compiler to jikes, since GNU Classpath's default is gcj.
# Unfortunately, many gcj versions are incapable of compiling GNU
Index: kaffe/FAQ/FAQ.kaffemd
diff -u kaffe/FAQ/FAQ.kaffemd:1.2 kaffe/FAQ/FAQ.kaffemd:1.3
--- kaffe/FAQ/FAQ.kaffemd:1.2 Mon Jun 7 19:14:14 2004
+++ kaffe/FAQ/FAQ.kaffemd Sun Jan 1 18:28:59 2006
@@ -43,6 +43,13 @@
KAFFEMD_STACK_ERROR is an alias for the special value representing an error for
mdGetStackSize() (usually 0).
+KAFFEMD_DISABLE_SETSTACKSIZE
+----------------------------
+
+If set the VM will not use mdSetStackSize to change stack size limit and
+will use the default one. However it will retrieve the stack size using
+mdGetStackSize().
+
KAFFEMD_BUGGY_STACKOVERFLOW
---------------------------
Index: kaffe/config/alpha/trampolines.S
diff -u kaffe/config/alpha/trampolines.S:1.3 kaffe/config/alpha/trampolines.S:1.4
--- kaffe/config/alpha/trampolines.S:1.3 Wed Jun 29 17:23:35 2005
+++ kaffe/config/alpha/trampolines.S Sun Jan 1 18:28:58 2006
@@ -38,11 +38,11 @@
ldgp $29,0($27)
lda $30,-14*8($30) # reserve 14 on stack
-# Save frame registers
+/* Save frame registers */
stq $26,0*8($30) # ra
.prologue 1
-# Save register arguments as local variables
+/* Save register arguments as local variables */
stq $16,1*8($30) # a0
stq $17,2*8($30) # a1
stq $18,3*8($30) # a2
@@ -56,14 +56,14 @@
stt $f20,11*8($30)
stt $f21,12*8($30)
-# Compute the address of methodTrampoline.method
+/* Compute the address of methodTrampoline.method */
lda $16,8($1)
-# Call C to do the fixup
+/* Call C to do the fixup */
jsr $26, C_FUNC_NAME(soft_fixup_trampoline)
ldgp $29,0($26)
mov $0,$27
-# Reload register arguments
+/* Reload register arguments */
ldq $16,1*8($30) # a0
ldq $17,2*8($30) # a1
ldq $18,3*8($30) # a2
@@ -80,10 +80,10 @@
ldq $26,0*8($30) # ra
lda $30,14*8($30) # release stack
-# Jump to translated method
+/* Jump to translated method */
jmp $31,($27),0
-# for __alpha_nextFrame()
+/* for __alpha_nextFrame() */
ret $31,($26),1
.end C_FUNC_NAME(alpha_do_fixup_trampoline)
Index: kaffe/config/alpha/osf/jit-md.h
diff -u kaffe/config/alpha/osf/jit-md.h:1.7 kaffe/config/alpha/osf/jit-md.h:1.8
--- kaffe/config/alpha/osf/jit-md.h:1.7 Mon Jun 18 10:38:04 2001
+++ kaffe/config/alpha/osf/jit-md.h Sun Jan 1 18:28:58 2006
@@ -15,6 +15,8 @@
#ifndef __alpha_osf_jit_md_h
#define __alpha_osf_jit_md_h
+#include "gtypes.h"
+
/**/
/* Include common information. */
/**/
@@ -83,7 +85,7 @@
char *fp;
} exceptionFrame;
-int __alpha_ra (int *pc);
+int __alpha_ra (uintp pc);
exceptionFrame *__alpha_nextFrame (exceptionFrame *frame);
/* Extract PC, FP and SP from the given frame */
Index: kaffe/config/alpha/osf/md.h
diff -u kaffe/config/alpha/osf/md.h:1.4 kaffe/config/alpha/osf/md.h:1.5
--- kaffe/config/alpha/osf/md.h:1.4 Fri Dec 30 18:38:52 2005
+++ kaffe/config/alpha/osf/md.h Sun Jan 1 18:28:58 2006
@@ -21,6 +21,8 @@
#include "kaffe-unix-stack.h"
+#define KAFFEMD_DISABLE_SETSTACKSIZE
+
#undef SP_OFFSET
#define SP_OFFSET 34
Index: kaffe/kaffe/kaffevm/thread.c
diff -u kaffe/kaffe/kaffevm/thread.c:1.105 kaffe/kaffe/kaffevm/thread.c:1.106
--- kaffe/kaffe/kaffevm/thread.c:1.105 Thu Aug 25 12:51:09 2005
+++ kaffe/kaffe/kaffevm/thread.c Sun Jan 1 18:28:55 2006
@@ -736,7 +736,9 @@
}
else if (stackSize == KAFFEMD_STACK_INFINITE || stackSize >= threadStackSize)
{
+#ifndef KAFFEMD_DISABLE_SETSTACKSIZE
mdSetStackSize(threadStackSize);
+#endif
/* Last chance. We check whether the size has really been updated. */
stackSize = mdGetStackSize();
}
===================================================================
Checking out kaffe/kaffe/kaffevm/systems/unix-pthreads/lock-impl.h
RCS: /home/cvs/kaffe/kaffe/kaffe/kaffevm/systems/unix-pthreads/lock-impl.h,v
VERS: 1.11
***************
--- /dev/null Sun Aug 4 19:57:58 2002
+++ kaffe/kaffe/kaffevm/systems/unix-pthreads/lock-impl.h Sun Jan 1 18:40:01 2006
@@ -0,0 +1,108 @@
+/*
+ * lock-impl.h
+ *
+ * Unix pthreads implements the jmutex and jcondvar abstractions.
+ * Most of the functions are inlined.
+ *
+ * Copyright (c) 1999
+ * Transvirtual Technologies, Inc. All rights reserved.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file.
+ */
+
+#ifndef __lock_impl_h
+#define __lock_impl_h
+
+#include <pthread.h>
+
+typedef pthread_mutex_t jmutex;
+typedef pthread_cond_t jcondvar;
+
+/* prototypes for jmutex interfaces. All inlined except jcondvar_wait() */
+
+extern void KaffePThread_setBlockingCall(void *sigdata);
+extern void KaffePThread_clearBlockingCall(void *sigdata);
+
+static inline void jmutex_initialise( jmutex* lk ) __UNUSED__;
+extern void jmutex_lock(jmutex* lk );
+static inline void jmutex_unlock( jmutex* lk ) __UNUSED__;
+
+static inline void jcondvar_initialise( jcondvar* cv ) __UNUSED__;
+static inline void jcondvar_signal( jcondvar* cv, jmutex *mux ) __UNUSED__;
+extern jboolean jcondvar_wait(jcondvar* cv, jmutex* mux, jlong timeout );
+
+
+/* inline jmutex/jcondvar functions. */
+
+static inline
+void
+jmutex_initialise( jmutex* lk )
+{
+ pthread_mutexattr_t muxAttr;
+
+ /* init a process private mutex. We deal with priority inversion
+ * by means of inheriting the highest priority of any thread who
+ * requests the mutex
+ */
+ pthread_mutexattr_init( &muxAttr);
+#if defined(_POSIX_THREAD_PROCESS_SHARED) && (_POSIX_THREAD_PROCESS_SHARED+0) != -1
+ pthread_mutexattr_setpshared( &muxAttr, PTHREAD_PROCESS_PRIVATE);
+#endif
+#if defined(_POSIX_THREAD_PRIO_INHERIT_POSIX_THREAD_PRIO_PROTECT)
+ pthread_mutexattr_setprotocol( &muxAttr, PTHREAD_PRIO_INHERIT);
+#endif
+ pthread_mutex_init( lk, &muxAttr);
+}
+
+static inline
+void
+jmutex_unlock( jmutex* lk )
+{
+ pthread_mutex_unlock(lk);
+}
+
+static inline
+void
+jmutex_destroy (jmutex* lk)
+{
+ pthread_mutex_destroy( lk );
+}
+
+
+static inline
+void
+jcondvar_initialise( jcondvar* cv )
+{
+ pthread_condattr_t cvAttr;
+
+ /* init a process private condvar */
+ pthread_condattr_init( &cvAttr);
+#if defined(_POSIX_THREAD_PROCESS_SHARED) && (_POSIX_THREAD_PROCESS_SHARED+0) != -1
+ pthread_condattr_setpshared( &cvAttr, PTHREAD_PROCESS_PRIVATE);
+#endif
+ pthread_cond_init( cv, &cvAttr);
+}
+
+static inline
+void
+jcondvar_signal( jcondvar* cv, UNUSED jmutex* mux)
+{
+ pthread_cond_signal( cv );
+}
+
+static inline
+void
+jcondvar_broadcast ( jcondvar* cv, UNUSED jmutex* mux)
+{
+ pthread_cond_broadcast( cv );
+}
+
+static inline
+void
+jcondvar_destroy( jcondvar *cv )
+{
+ pthread_cond_destroy( cv );
+}
+
+#endif /* __lock_impl_h */
Index: kaffe/libraries/clib/native/Makefile.am
diff -u kaffe/libraries/clib/native/Makefile.am:1.51 kaffe/libraries/clib/native/Makefile.am:1.52
--- kaffe/libraries/clib/native/Makefile.am:1.51 Sat Oct 29 19:43:08 2005
+++ kaffe/libraries/clib/native/Makefile.am Sun Jan 1 18:29:00 2006
@@ -16,7 +16,7 @@
-I$(top_srcdir)/kaffe/jvmpi \
-I$(top_builddir)/include \
-I$(top_srcdir)/kaffe/kaffevm/jni \
- -I$(top_srcdir)/libraries/clib/fdlibm \
+ -I$(top_srcdir)/libraries/javalib/external/classpath/native/fdlibm \
-I$(top_srcdir)/libraries/javalib/external/classpath/native/jni/classpath
LANG_SRCS = \
@@ -68,7 +68,7 @@
libjavalang_la_DEPENDENCIES = \
../../../kaffe/kaffevm/libkaffevm.la \
- $(top_builddir)/libraries/clib/fdlibm/libfdlibm.la
+ $(top_builddir)/libraries/javalib/external/classpath/native/fdlibm/libfdlibm.la
libjavalang_la_LIBADD = \
$(top_builddir)/kaffe/kaffevm/libkaffevm.la \
Index: kaffe/libraries/clib/native/Makefile.in
diff -u kaffe/libraries/clib/native/Makefile.in:1.204 kaffe/libraries/clib/native/Makefile.in:1.205
--- kaffe/libraries/clib/native/Makefile.in:1.204 Wed Dec 28 20:44:20 2005
+++ kaffe/libraries/clib/native/Makefile.in Sun Jan 1 18:29:00 2006
@@ -85,7 +85,7 @@
LTLIBRARIES = $(native_LTLIBRARIES)
am__DEPENDENCIES_1 =
am__DEPENDENCIES_2 = ../../../kaffe/kaffevm/libkaffevm.la \
- $(top_builddir)/libraries/clib/fdlibm/libfdlibm.la
+ $(top_builddir)/libraries/javalib/external/classpath/native/fdlibm/libfdlibm.la
am__objects_1 = libjavalang_la-gnu_classpath_VMStackWalker.lo \
libjavalang_la-gnu_classpath_VMSystemProperties.lo \
libjavalang_la-java_lang_Math.lo \
@@ -391,7 +391,7 @@
-I$(top_srcdir)/kaffe/jvmpi \
-I$(top_builddir)/include \
-I$(top_srcdir)/kaffe/kaffevm/jni \
- -I$(top_srcdir)/libraries/clib/fdlibm \
+ -I$(top_srcdir)/libraries/javalib/external/classpath/native/fdlibm \
-I$(top_srcdir)/libraries/javalib/external/classpath/native/jni/classpath
LANG_SRCS = \
@@ -443,7 +443,7 @@
libjavalang_la_DEPENDENCIES = \
../../../kaffe/kaffevm/libkaffevm.la \
- $(top_builddir)/libraries/clib/fdlibm/libfdlibm.la
+ $(top_builddir)/libraries/javalib/external/classpath/native/fdlibm/libfdlibm.la
libjavalang_la_LIBADD = \
$(top_builddir)/kaffe/kaffevm/libkaffevm.la \
More information about the kaffe
mailing list