From owner-freebsd-hackers Sun Apr 7 07:00:21 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id HAA13033 for hackers-outgoing; Sun, 7 Apr 1996 07:00:21 -0700 (PDT) Received: from whizzo.transsys.com (whizzo.TransSys.COM [144.202.42.10]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id HAA13028 for ; Sun, 7 Apr 1996 07:00:17 -0700 (PDT) Received: from localhost.transsys.com (localhost.transsys.com [127.0.0.1]) by whizzo.transsys.com (8.7.5/8.7.3) with SMTP id JAA01073; Sun, 7 Apr 1996 09:59:55 -0400 (EDT) Message-Id: <199604071359.JAA01073@whizzo.transsys.com> X-Authentication-Warning: whizzo.transsys.com: Host localhost.transsys.com [127.0.0.1] didn't use HELO protocol To: Michael Smith cc: roell@blah.a.isar.de (Thomas Roell), terry@lambert.org, hackers@FreeBSD.ORG, jkh@time.cdrom.com, roell@xinside.com From: "Louis A. Mamakos" Subject: Re: The F_SETOWN problem.. In-reply-to: Your message of "Sun, 07 Apr 1996 23:23:08 +0930." <199604071353.XAA06599@genesis.atrad.adelaide.edu.au> Date: Sun, 07 Apr 1996 09:59:54 -0400 Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Thomas Roell stands accused of saying: > > > Er, almost certainly not. Try "low-cost asynchronous input". Remember > > > what TR does? Think about how handy it would be to do your mouse data > > > handling inside a signal handler; your main loop would be presented > > > with events out of a FIFO as faits accompli, you could probably even > > > stuff the location registers in the signal handler. > > > > Was it that obvious ;-) Actually two reasons why I need it. One is > > In context, there really weren't too many other things you could want > it for, unless perhaps you wanted to put dongle support in AccelX 8) While not an X server application, you'll note that xntpd uses SIGIO so that it might read and, most importanty, timestamp traffic arriving on the network. This is critical to making NTP accurately synchronize the clock. By using SIGIO, you can not have to worry nearly so much about long-running sections of code and not being able to check for pending input for a "long" time. The model of signal as 'interrupt' works extremely well for this sort of appliation. Of course, this all works Just Fine with sockets.. What has this to do with ttys? It's conceivable that you might have an external reference clock (GPS, WWVB, etc) which is sending you timestamps periodically. It would be nice to be able to handle these in the same sort of way. louie