Date: Fri, 25 Aug 2000 17:29:11 +0930 (CST) From: Greg Lewis <glewis@ares.trc.adelaide.edu.au> To: Ari Suutari <ari@suutari.iki.fi> Cc: freebsd-java@freebsd.org Subject: Re: Solved: JDK 2 Patchset 10 + FreeBSD_CommAPI Message-ID: <200008250759.RAA66351@ares.trc.adelaide.edu.au> In-Reply-To: <00da01c00db3$9261bd80$0e05a8c0@intranet.syncrontech.com> from Ari Suutari at "Aug 24, 2000 01:10:46 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Ari Suutari wrote: > Hi again (I feel like talking to myself already....) No, we're all listening :). > Just got things working with patchset 10. The problem is that > FreeBSD_CommAPI uses select(2), which is no longer overrided > by green threads package. The select support of green threads > is behind #ifdef USE_SELECT (see > src/freebsd/hpi/green_threads/src/iomgr.c), > which seems to defined by Makefiles only if FreeBSD version is old > enough (there seems to be a condition for it in Defs-freebsd.gmk). Yes, select() is used with FreeBSD 2.2 and poll() is used for later versions. The original Solaris code itself just uses poll(). The select() wrapper was introduced by the ports team during the port of 1.1.8 and has carried over. I understand that 2.2 either doesn't have a poll() implementation or the implementation isn't quite right. > So I came up with two different solutions: > > 1) Modify CommAPI so that it uses poll instead of select. I have done > this and tested it and it seems to work OK. > > 2) Modify JDK for next patchset so that a wrapper for select is > provided by green threads. Maybe this would be a good thing, > since there may be other JNI code out in the world which relies > on select and omission for wrapper causes such code to fail. Right. That makes some sense. Currently the wrapper is excluded for FreeBSD 3.x and higher since select() isn't being used in the core parts of the code anymore. Maybe we need to include the wrapper whether select() is used there or not. Good sleuth work btw :). -- Greg Lewis glewis@trc.adelaide.edu.au Computing Officer +61 8 8303 5083 Teletraffic Research Centre To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008250759.RAA66351>