From owner-freebsd-current Tue Aug 13 14:22:11 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA11863 for current-outgoing; Tue, 13 Aug 1996 14:22:11 -0700 (PDT) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id OAA11841 for ; Tue, 13 Aug 1996 14:22:05 -0700 (PDT) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id XAA24088; Tue, 13 Aug 1996 23:21:40 +0200 Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id XAA15918; Tue, 13 Aug 1996 23:21:39 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.5/8.6.9) id XAA06086; Tue, 13 Aug 1996 23:13:48 +0200 (MET DST) From: J Wunsch Message-Id: <199608132113.XAA06086@uriah.heep.sax.de> Subject: Re: locking up To: freebsd-current@FreeBSD.org (FreeBSD-current users) Date: Tue, 13 Aug 1996 23:13:48 +0200 (MET DST) Cc: bde@zeta.org.au (Bruce Evans) Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199608131955.FAA20954@godzilla.zeta.org.au> from Bruce Evans at "Aug 14, 96 05:55:43 am" X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-Mailer: ELM [version 2.4ME+ PL17 (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 As Bruce Evans wrote: > >It only returns early if `noblock' is specified. (It returns NULL in > >that case.) Otherwise, it loops again instead. > > `noblock' is always set in the calls from pcrint(), so this guarantees Ah, right. > scgetc() also seems to return early in all cases when XSERVER != 0. Actually not. It returns earlier than usual in case XSERVER != 0 and pcvt_kbd_raw == TRUE, meaning that the Xserver is currently active and wants to see the unprocessed scan codes. However, it doesn't return `early' (as opposed to looping around), the ``goto loop'' is only much more obfuscated then. > I think there is a problem iff PCVT_KBD_FIFO != 0. Unlikely, since this is the most common and thus most tested case (along with XSERVER != 0). My latest change has significantly simplified the determination expression for whether there's actually a character pending. I'm surprised that the long, ugly and obfuscated condition could be replaced by something that simple. ;) By now, i cannot see any failure out of this. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)