Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 08 Feb 2002 14:46:21 +0100
From:      Titus von Boxberg <titus@bhi-hamburg.de>
To:        "freebsd-hackers@FreeBSD.ORG" <freebsd-hackers@FreeBSD.ORG>
Subject:   tcdrain won't work?
Message-ID:  <3C63D6AD.475263AC@schuett-inhouse.de>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C63D6AD.475263AC>