[haiku-commits] Re: r42089 - haiku/trunk/src/add-ons/kernel/drivers/ports/usb_serial

  • From: "Ingo Weinhold" <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 10 Jun 2011 23:44:19 +0200

Axel Dörfler wrote:
> mmlr@xxxxxxxx wrote:
> > I'm looking into a few ways to fix that next.
> 
> Nice one! But why offloading writes to another thread anyway? Aren't 
> they supposed to be blocking usually? If not, then close() (or at least, 
> free()) waiting until the output queue is drained seems to make the 
> most sense to me.

Just in case that wasn't known yet, the POSIX specs sport a whole chapter on 
terminals [1]. It's also worthwhile to have a look at the specs for open(), 
close(), read(), write(), and friends, since most of them also explicitly state 
how they work on TTYs.

CU, Ingo

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap11.html

Other related posts: