[kaffe] CVS kaffe (guilhem): Fixlets + VMSelector merged back.
Guilhem Lavaux
guilhem at kaffe.org
Mon Apr 11 07:41:13 PDT 2005
On Mon, 2005-04-11 at 23:22 +0900, Rei Odaira wrote:
> Hi,
>
> > + while (1)
> > + {
> > + r = select (n, readfds, writefds, exceptfds, timeout ? &delay : NULL);
> > +
> > + if (r < 0 && errno != EINTR)
> > + return -errno;
> > + else if (r >= 0)
> > + return r;
>
> Could anyone replace this select() with KSELECT()?
Oooops. Ok, I've fixed my last commit. Thank you for reminding me of
it. :)
Regards,
Guilhem.
>
> Thanks in advance,
> Rei
> Plain text document attachment (kaffe-VMSelector.patch)
> Index: libraries/clib/nio/gnu_java_nio_VMSelector.c
> ===================================================================
> RCS file: /cvs/kaffe/kaffe/libraries/clib/nio/gnu_java_nio_VMSelector.c,v
> retrieving revision 1.10
> diff -a -u -r1.10 gnu_java_nio_VMSelector.c
> --- libraries/clib/nio/gnu_java_nio_VMSelector.c 10 Apr 2005 16:46:12 -0000 1.10
> +++ libraries/clib/nio/gnu_java_nio_VMSelector.c 11 Apr 2005 14:25:24 -0000
> @@ -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)->
> _______________________________________________
> kaffe mailing list
> kaffe at kaffe.org
> http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
More information about the kaffe
mailing list