Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Feb 2002 19:41:07 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        "Lane, Frank L" <frank.l.lane@boeing.com>
Cc:        "'freebsd-hackers@freebsd.org'" <freebsd-hackers@freebsd.org>
Subject:   Re: Posix question
Message-ID:  <3C746C53.7CE5EB8B@mindspring.com>
References:  <A54B2AB20443BC40811D711D8C843FDB01686242@xch-se-01.se.nos.boeing.com>

next in thread | previous in thread | raw e-mail | index | archive | help
"Lane, Frank L" wrote:
> I'm facing a serial write problem.  Posix provides a function tcdrain ()
> that blocks until all serial data has been written from the card.  Is there
> an analogous function in the gnu c compiler for windows platforms?  Does the
> gnu c compiler try to give you posix functionality within the windows
> environment?  Thank you for any help you'll offer.

This question really belongs on the "questions" mailing
list -- and not the FreeBSD one, the one run by Microsoft.

--

Are we talking serial devices here?

The POSIX tcdrain only guarantees that the driver believes
the data has been written; you still have a timing window
in which the transmit FIFO will remain undrained, leaving
a latency proportional to the FIFO depth divided by the
baud rate.

In Windows, there are serial operations that you can use to
force the drain of the driver to the hardware, but, again,
there is a tiny latency window because of the physical
hardware.

No, we don't wait until the transmit queue empty interrupt.

This actually isn't a feature of the compiler, it's a feature
of the libc you end up using.

I think what you are looking for on Windows is called
"CYGWIN32".  No, it does not guarantee full POSIX compliance,
and the license will impact your code's license.

There are a couple of third party emulation layers; one
of them is a Linux emulation for Windows, in fact... the
company was acquired by Microsoft last year.  So the answer
is that you can buy it from Microsoft, if you want to avoid
the license issue with CYGWIN32.

Alternately, you can search for "POSIX" and "WINDOWS" in
a search engine, and find the other companies out there.

-- Terry

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?3C746C53.7CE5EB8B>