From owner-cvs-sys Sun Dec 1 04:56:21 1996 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id EAA13937 for cvs-sys-outgoing; Sun, 1 Dec 1996 04:56:21 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id EAA13931; Sun, 1 Dec 1996 04:56:12 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.3/8.6.9) id XAA19611; Sun, 1 Dec 1996 23:35:47 +1100 Date: Sun, 1 Dec 1996 23:35:47 +1100 From: Bruce Evans Message-Id: <199612011235.XAA19611@godzilla.zeta.org.au> To: bde@zeta.org.au, pst@shockwave.com Subject: Re: cvs commit: src/sys/i386/isa sio.c Cc: bde@freefall.freebsd.org, cvs-all@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-sys@freefall.freebsd.org Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >OK, we're in perfect agreement there. So now, the $24 question is: > >"If I set comdefaultrate to 115200 and don't open /dev/ttyd0, exactly what > is going to happen every time we output a character?" The speed will be 9600 to begin with. It will be changed to 115200. Then the character will be written. Then the output routine will spin until the output is incomplete. Then the speed will be restored to 9600. Context switching the speed (and other h/w state) is bad iff input is arriving while you're switching and if input arrives while you're not in the spinloop waiting for it. This is bad for gdb of course. There is a simple workaround: set the initial speed of /dev/ttyd0 to 115200 and don't neglect to open it (stty 115200