[kaffe] CVS kaffe (guilhem): VMSelector fix

Kaffe CVS cvs-commits at kaffe.org
Mon Apr 11 07:50:50 PDT 2005


PatchSet 5671 
Date: 2005/04/11 14:46:09
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
VMSelector fix

2005-04-11  Guilhem Lavaux  <guilhem at kaffe.org>
        Rei Odaira <ray at is.s.u-tokyo.ac.jp>

        * libraries/clib/nio/gnu_java_nio_VMSelector.c: Patched again to use
        jthread syscall system.

Members: 
	ChangeLog:1.3837->1.3838 
	libraries/clib/nio/gnu_java_nio_VMSelector.c:1.10->1.11 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3837 kaffe/ChangeLog:1.3838
--- kaffe/ChangeLog:1.3837	Sun Apr 10 17:26:28 2005
+++ kaffe/ChangeLog	Mon Apr 11 14:46:09 2005
@@ -1,3 +1,9 @@
+2005-04-11  Guilhem Lavaux  <guilhem at kaffe.org>
+	Rei Odaira <ray at is.s.u-tokyo.ac.jp>
+
+	* libraries/clib/nio/gnu_java_nio_VMSelector.c: Patched again to use
+	jthread syscall system.
+
 2005-04-10  Guilhem Lavaux  <guilhem at kaffe.org>
 
 	* test/jni/Makefile.am: Fixed dlopened libraries.
Index: kaffe/libraries/clib/nio/gnu_java_nio_VMSelector.c
diff -u kaffe/libraries/clib/nio/gnu_java_nio_VMSelector.c:1.10 kaffe/libraries/clib/nio/gnu_java_nio_VMSelector.c:1.11
--- kaffe/libraries/clib/nio/gnu_java_nio_VMSelector.c:1.10	Sun Apr 10 16:46:12 2005
+++ kaffe/libraries/clib/nio/gnu_java_nio_VMSelector.c	Mon Apr 11 14:46:13 2005
@@ -36,6 +36,7 @@
 exception statement from your version. */
 
 #include "config.h"
+#include "jsyscall.h"
 
 /* <sys/types.h> needs to be included on OSX before <sys/select.h> */
 #if defined(HAVE_SYS_TYPES_H)
@@ -151,12 +152,15 @@
 
   while (1)
     {
-      r = select (n, readfds, writefds, exceptfds, timeout ? &delay : NULL);
+      int retcode;
 
-      if (r < 0 && errno != EINTR)
-	return -errno;
-      else if (r >= 0)
-	return r;
+      r = KSELECT (n, readfds, writefds, exceptfds,
+		   timeout ? &delay : NULL, &retcode);
+
+      if (r == 0)
+	return retcode;
+      if (r != EINTR)
+	return -r;
 
       /* Here we know we got EINTR. */
       if ((*env)->




More information about the kaffe mailing list