[kaffe] CVS kaffe (guilhem): PThreads fixes for SunOS + some makefile has been regenerated.

Kaffe CVS cvs-commits at kaffe.org
Sat Jul 10 00:51:17 PDT 2004


PatchSet 4924 
Date: 2004/07/10 07:45:20
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
PThreads fixes for SunOS + some makefile has been regenerated.

        * kaffe/kaffevm/ksem.c: Removed a commented assertion.

        * kaffe/kaffevm/systems/unix-pthreads/thread-impl.c
        (suspend_signal_handler): Use sigwait instead of
        sigsuspend (needed on SunOS).
        (jthread_init): Updated suspendSet to match sigwait interface.

        * m4/solarispthread.m4: Define _POSIX_PTHREAD_SEMANTICS on SunOS.

        * configure, libraries/clib/awt/qt/Makefile.in,
        libraries/javalib/Makefile.am, libraries/javalib/Makefile.in:
        Regenerated.

Members: 
	ChangeLog:1.2489->1.2490 
	configure:1.349->1.350 
	kaffe/kaffevm/ksem.c:1.1->1.2 
	kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.29->1.30 
	libraries/clib/awt/qt/Makefile.in:1.59->1.60 
	libraries/javalib/Makefile.am:1.197->1.198 
	libraries/javalib/Makefile.in:1.268->1.269 
	m4/solarispthread.m4:1.1->1.2 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2489 kaffe/ChangeLog:1.2490
--- kaffe/ChangeLog:1.2489	Sat Jul 10 02:48:04 2004
+++ kaffe/ChangeLog	Sat Jul 10 07:45:20 2004
@@ -1,3 +1,18 @@
+2004-07-10  Guilhem Lavaux <guilhem at kaffe.org>
+
+	* kaffe/kaffevm/ksem.c: Removed a commented assertion.
+
+	* kaffe/kaffevm/systems/unix-pthreads/thread-impl.c
+	(suspend_signal_handler): Use sigwait instead of
+	sigsuspend (needed on SunOS).
+	(jthread_init): Updated suspendSet to match sigwait interface.
+
+	* m4/solarispthread.m4: Define _POSIX_PTHREAD_SEMANTICS on SunOS.
+
+	* configure, libraries/clib/awt/qt/Makefile.in,
+	libraries/javalib/Makefile.am, libraries/javalib/Makefile.in:
+	Regenerated.
+
 2004-07-10  Jim Huang  <jserv at kaffe.org>
 
 	* FAQ/FAQ.awt:
Index: kaffe/configure
diff -u kaffe/configure:1.349 kaffe/configure:1.350
--- kaffe/configure:1.349	Fri Jul  9 15:44:22 2004
+++ kaffe/configure	Sat Jul 10 07:45:21 2004
@@ -30933,6 +30933,7 @@
    { (exit 1); exit 1; }; }
 	fi
 
+
 	echo "$as_me:$LINENO: checking for library containing sem_init" >&5
 echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
 if test "${ac_cv_search_sem_init+set}" = set; then
@@ -31058,6 +31059,12 @@
   test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
 
 fi
+
+	case $Khost_os in
+		sunos*)
+			CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
+			;;
+	esac
 
 
 	VMLIBS="$VM_LIBS $PTHREAD_LIBS"
Index: kaffe/kaffe/kaffevm/ksem.c
diff -u kaffe/kaffe/kaffevm/ksem.c:1.1 kaffe/kaffe/kaffevm/ksem.c:1.2
--- kaffe/kaffe/kaffevm/ksem.c:1.1	Sat Mar 20 18:26:05 2004
+++ kaffe/kaffe/kaffevm/ksem.c	Sat Jul 10 07:45:29 2004
@@ -73,7 +73,6 @@
 ksemPut(Ksem* sem)
 {
 	jmutex_lock(&sem->mux);
-	/*assert((sem->count == 0) || (sem->count == 1));*/
 	assert(sem->count == 0);
         sem->count = 1;
 	jcondvar_signal(&sem->cv, &sem->mux);
Index: kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c
diff -u kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.29 kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.30
--- kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.29	Thu Jul  8 17:33:42 2004
+++ kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c	Sat Jul 10 07:45:30 2004
@@ -435,8 +435,8 @@
   tMapPriorities(maxpr+1);
   tInitSignalHandlers();
 
-  sigfillset( &suspendSet);
-  sigdelset( &suspendSet, SIG_RESUME);
+  sigemptyset( &suspendSet);
+  sigaddset( &suspendSet, SIG_RESUME);
 
   tSetupFirstNative();
 
@@ -965,6 +965,7 @@
 
   if ( cur->suspendState == SS_PENDING_SUSPEND ){
 	JTHREAD_JMPBUF env;
+	int s;
 
 	/*
 	 * Note: We're not gonna do a longjmp to this place, we just want
@@ -981,9 +982,9 @@
 
 	/* freeze until we get a subsequent SIG_RESUME */
 	while( cur->suspendState == SS_SUSPENDED )
-		sigsuspend( &suspendSet);
+		sigwait( &suspendSet, &s);
 
-	DBG( JTHREADDETAIL, dprintf("sigsuspend return: %p\n", cur))
+	DBG( JTHREADDETAIL, dprintf("sigwait return: %p\n", cur))
 
 	cur->stackCur     = 0;
 	cur->suspendState = 0;
@@ -995,7 +996,7 @@
 
 /*
  * The resume signal handler, which we mainly need to get the implicit sigreturn
- * call (i.e. to unblock a preceeding sigsuspend).
+ * call (i.e. to unblock a preceeding sigwait).
  */
 void
 resume_signal_handler ( int sig )
Index: kaffe/libraries/clib/awt/qt/Makefile.in
diff -u kaffe/libraries/clib/awt/qt/Makefile.in:1.59 kaffe/libraries/clib/awt/qt/Makefile.in:1.60
--- kaffe/libraries/clib/awt/qt/Makefile.in:1.59	Sat Jul 10 01:58:25 2004
+++ kaffe/libraries/clib/awt/qt/Makefile.in	Sat Jul 10 07:45:30 2004
@@ -23,8 +23,8 @@
 # Copyright (c) 2002, 2003, 2004
 #	Kaffe.org contributors, see ChangeLog for details.  All rights reserved.
 #
-# See the file "license.terms" for information on usage and redistribution
-# of this file.
+# See the file "license.terms" for information on usage and redistribution 
+# of this file. 
 
 
 SOURCES = $(libawt_la_SOURCES) $(nodist_libawt_la_SOURCES)
@@ -391,7 +391,6 @@
 BUILT_SOURCES = $(libawt_la_MOC)
 CLEANFILES = so_locations $(BUILT_SOURCES)
 EXTRA_DIST = evt.h
-
 all: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) all-am
 
Index: kaffe/libraries/javalib/Makefile.am
diff -u kaffe/libraries/javalib/Makefile.am:1.197 kaffe/libraries/javalib/Makefile.am:1.198
--- kaffe/libraries/javalib/Makefile.am:1.197	Fri Jul  9 06:20:19 2004
+++ kaffe/libraries/javalib/Makefile.am	Sat Jul 10 07:45:31 2004
@@ -50,6 +50,7 @@
 	$(gnu_inet_ftp_SRCS) \
 	$(gnu_inet_util_SRCS) \
 	$(gnu_java_awt_SRCS) \
+	$(gnu_java_awt_peer_SRCS) \
 	$(gnu_java_beans_SRCS) \
 	$(gnu_java_beans_editors_SRCS) \
 	$(gnu_java_io_SRCS) \
@@ -244,9 +245,10 @@
 	gnu/java/awt/BitMaskExtent.java \
 	gnu/java/awt/Buffers.java \
 	gnu/java/awt/ComponentDataBlitOp.java \
-	gnu/java/awt/EventModifier.java
 	gnu/java/awt/EmbeddedWindow.java \
 	gnu/java/awt/EmbeddedWindowSupport.java \
+	gnu/java/awt/EventModifier.java
+gnu_java_awt_peer_SRCS = \
 	gnu/java/awt/peer/EmbeddedWindowPeer.java
 gnu_java_beans_SRCS = \
 	gnu/java/beans/BeanInfoEmbryo.java \
Index: kaffe/libraries/javalib/Makefile.in
diff -u kaffe/libraries/javalib/Makefile.in:1.268 kaffe/libraries/javalib/Makefile.in:1.269
--- kaffe/libraries/javalib/Makefile.in:1.268	Fri Jul  9 06:20:18 2004
+++ kaffe/libraries/javalib/Makefile.in	Sat Jul 10 07:45:32 2004
@@ -355,6 +355,7 @@
 	$(gnu_inet_ftp_SRCS) \
 	$(gnu_inet_util_SRCS) \
 	$(gnu_java_awt_SRCS) \
+	$(gnu_java_awt_peer_SRCS) \
 	$(gnu_java_beans_SRCS) \
 	$(gnu_java_beans_editors_SRCS) \
 	$(gnu_java_io_SRCS) \
@@ -553,9 +554,11 @@
 	gnu/java/awt/BitMaskExtent.java \
 	gnu/java/awt/Buffers.java \
 	gnu/java/awt/ComponentDataBlitOp.java \
-	gnu/java/awt/EventModifier.java \
 	gnu/java/awt/EmbeddedWindow.java \
 	gnu/java/awt/EmbeddedWindowSupport.java \
+	gnu/java/awt/EventModifier.java
+
+gnu_java_awt_peer_SRCS = \
 	gnu/java/awt/peer/EmbeddedWindowPeer.java
 
 gnu_java_beans_SRCS = \
Index: kaffe/m4/solarispthread.m4
diff -u kaffe/m4/solarispthread.m4:1.1 kaffe/m4/solarispthread.m4:1.2
--- kaffe/m4/solarispthread.m4:1.1	Sun Jun  6 12:49:21 2004
+++ kaffe/m4/solarispthread.m4	Sat Jul 10 07:45:33 2004
@@ -3,6 +3,14 @@
 dnl
 dnl Derived from Python 2.3.4 check in their GPL-comaptible configure.in.
 AC_DEFUN([KAFFE_LIB_SOLARIS_PTHREAD],
-	 [AC_SEARCH_LIBS([sem_init],[rt posix4])])
+
+[
+	AC_SEARCH_LIBS([sem_init],[rt posix4])
+	case $Khost_os in
+		sunos*)
+			CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
+			;;
+	esac
+])
 
 




More information about the kaffe mailing list