From owner-freebsd-hackers Fri Feb 8 5:39:41 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mailout11.sul.t-online.com (mailout11.sul.t-online.com [194.25.134.85]) by hub.freebsd.org (Postfix) with ESMTP id 55BAA37B419 for ; Fri, 8 Feb 2002 05:39:37 -0800 (PST) Received: from fwd11.sul.t-online.de by mailout11.sul.t-online.com with smtp id 16ZBFY-0001pR-00; Fri, 08 Feb 2002 14:39:36 +0100 Received: from mail.net (340061203289-0001@[217.227.56.181]) by fmrl11.sul.t-online.com with esmtp id 16ZBFU-0zukkKC; Fri, 8 Feb 2002 14:39:32 +0100 Received: from gateway.schuett-inhouse.de (localhost [127.0.0.1]) by mail.net (8.11.1/8.11.1) with ESMTP id g18DUv058284 for ; Fri, 8 Feb 2002 14:30:57 +0100 (CET) (envelope-from titus@schuett-inhouse.de) Received: from schuett-inhouse.de (kd.schuett-inhouse.de [192.168.3.3]) by gateway.schuett-inhouse.de (8.11.1/8.11.1) with ESMTP id g18DSE358230 for ; Fri, 8 Feb 2002 14:28:14 +0100 (CET) (envelope-from titus@schuett-inhouse.de) Message-ID: <3C63D6AD.475263AC@schuett-inhouse.de> Date: Fri, 08 Feb 2002 14:46:21 +0100 From: Titus von Boxberg X-Mailer: Mozilla 4.78 [de] (Windows NT 5.0; U) X-Accept-Language: de MIME-Version: 1.0 To: "freebsd-hackers@FreeBSD.ORG" Subject: tcdrain won't work? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Sender: 340061203289-0001@t-dialin.net Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I tried to use tcdrain to make sure that all characters are sent via a COM port but it seems that it won't work in about 50% of the calls to it, i.e. tcdrain returns before all characters are sent via sio.c. Has anyone noticed that effect? I tried to understand how it works. Apparently tty.c operates in ttywait() and ttwwakeup() on the output queue size in tp->t_outq.c_cc and TS_BUSY in tp->t_state (?). I can't find any piece of code filling tp->t_outq.c_cc with other values than 0. And sio.c seems to not set TS_BUSY in tp if outq.c_cc is not 0. Is it simply unimplemented or have I missed the point? Thanks in advance! Titus To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message