From owner-freebsd-current Fri Jun 6 22:24:50 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id WAA00902 for current-outgoing; Fri, 6 Jun 1997 22:24:50 -0700 (PDT) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id WAA00893 for ; Fri, 6 Jun 1997 22:24:46 -0700 (PDT) Received: (from msmith@localhost) by genesis.atrad.adelaide.edu.au (8.8.5/8.7.3) id OAA10751; Sat, 7 Jun 1997 14:54:17 +0930 (CST) From: Michael Smith Message-Id: <199706070524.OAA10751@genesis.atrad.adelaide.edu.au> Subject: Re: sio driver performance In-Reply-To: <199706070402.XAA26092@bmccane.uit.net> from Wm Brian McCane at "Jun 6, 97 11:02:10 pm" To: root@bmccane.uit.net (Wm Brian McCane) Date: Sat, 7 Jun 1997 14:54:17 +0930 (CST) Cc: msmith@atrad.adelaide.edu.au, straka@inficad.com, bde@zeta.org.au, current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Wm Brian McCane stands accused of saying: > I think Mike is right on this one. I would suggest adding a select call to > your program with a read and exception fd_set. If the bit gets set in the > exception fd_set, close the port and reopen it. This way you will wait until > DCD is high before continuing your reads. It also makes a nice spring-board > for when someone asks you to monitor more ports at once. It's easy enough just to wait for read() to return zero, close and reopen the device, if that's all you care about. > brian -- ]] Mike Smith, Software Engineer msmith@gsoft.com.au [[ ]] Genesis Software genesis@gsoft.com.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control. (ph) +61-8-8267-3493 [[ ]] Unix hardware collector. "Where are your PEZ?" The Tick [[