[kaffe] CVS kaffe (robilad): Small fix for accept on pthreads

Kaffe CVS cvs-commits at kaffe.org
Thu Feb 10 14:00:27 PST 2005


PatchSet 5510 
Date: 2005/02/10 21:48:28
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Small fix for accept on pthreads

2005-02-10  Dalibor Topic  <robilad at kaffe.org>

        * kaffe/kaffevm/systems/unix-pthreads/syscalls.c (jthreadedAccept):
        Fixed accept again for the case that select was interrupted.

Members: 
	ChangeLog:1.3554->1.3555 
	kaffe/kaffevm/systems/unix-pthreads/syscalls.c:1.28->1.29 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3554 kaffe/ChangeLog:1.3555
--- kaffe/ChangeLog:1.3554	Tue Feb  8 23:15:03 2005
+++ kaffe/ChangeLog	Thu Feb 10 21:48:28 2005
@@ -1,3 +1,8 @@
+2005-02-10  Dalibor Topic  <robilad at kaffe.org>
+
+	* kaffe/kaffevm/systems/unix-pthreads/syscalls.c (jthreadedAccept): 
+	Fixed accept again for the case that select was interrupted.
+
 2005-02-08  Dalibor Topic  <robilad at kaffe.org>
 
 	* kaffe/scripts/compat/javac.in: Switched to use jikes
Index: kaffe/kaffe/kaffevm/systems/unix-pthreads/syscalls.c
diff -u kaffe/kaffe/kaffevm/systems/unix-pthreads/syscalls.c:1.28 kaffe/kaffe/kaffevm/systems/unix-pthreads/syscalls.c:1.29
--- kaffe/kaffe/kaffevm/systems/unix-pthreads/syscalls.c:1.28	Tue Jan  4 18:11:50 2005
+++ kaffe/kaffe/kaffevm/systems/unix-pthreads/syscalls.c	Thu Feb 10 21:48:35 2005
@@ -473,7 +473,11 @@
 	/* absolute time at which time out is reached */
 	int r=-1, ret;	
 	ret = waitForTimeout(fd,timeout);
-	if (ret > 0) {
+
+	/* If result is 0, we had a timeout. 
+	 * If it's not, let's try to accept.
+	 */
+	if (ret != 0) {
 		r = accept(fd,addr,len);
 		SET_RETURN_OUT(r, out, r)
 		return (r);




More information about the kaffe mailing list