From owner-freebsd-java Thu Aug 24 0:13:16 2000 Delivered-To: freebsd-java@freebsd.org Received: from osku.suutari.iki.fi (osku.syncrontech.com [213.28.98.4]) by hub.freebsd.org (Postfix) with ESMTP id 9747037B42C for ; Thu, 24 Aug 2000 00:13:12 -0700 (PDT) Received: from coffee (adsl-nat.syncrontech.com [213.28.98.3]) by osku.suutari.iki.fi (8.9.3/8.9.3) with SMTP id KAA32002; Thu, 24 Aug 2000 10:13:00 +0300 (EEST) (envelope-from ari@suutari.iki.fi) Message-ID: <00ce01c00d9a$bce31fe0$0e05a8c0@intranet.syncrontech.com> From: "Ari Suutari" To: "Gary Howland" Cc: , References: Subject: Summary: JDK 2 Patchset 10 + FreeBSD_CommAPI Date: Thu, 24 Aug 2000 10:13:00 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi all, A quick summary about this: > > It was nothing to do with threads, more to do with using the wrong flags > with termio > The termio stuff seems to need some polising. There seems to be a fcntl call to setup SIGIO delivery, but the signal is not handled anywhere. Also, what might be the idea behind VMIN & VTIME settings, I'm not sure that the current selection is the best one. However, what is causing my problem is really that other threads are not running when JNI code sits in a loop periodically calling select(2). Partial fix seems to be to call Thread.yield inside that loop, but even with that, the threads are scheduled in a manner that is far away from perfect. When I look at JDK sources how, for example, a read from socket is implemented, it seems to be so that it calls JVM_Read which in turn calls sysRead, which in turn calls a wrapper provided by green threads package. So, shouldn't the JNI stuff in comm package (libSerial.so) be linked against green threads wrappers somehow to make things really work ? Ari S. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message