Rewriting the FIFO code
Corinna Vinschen
corinna-cygwin@cygwin.com
Wed Dec 26 19:03:00 GMT 2018
On Dec 26 14:00, Ken Brown wrote:
> On 12/26/2018 6:37 AM, Corinna Vinschen wrote:
> > On Dec 25 21:14, Ken Brown wrote:
> >> On 12/14/2018 8:43 AM, Ken Brown wrote:
> >>> I'll write
> >>> again when/if I've sorted it out.
> >>
> >> Hi Corinna,
> >>
> >> Here's a new start. For now, at least, I'm only trying to accommodate one
> >> reader and several writers. Maybe later I'll worry about more than one reader.
> >>
> >> The attached patch indicates the approach I have in mind. There's much more to
> >> do, and I haven't thought about the duplex case yet. And there isn't enough
> >> written for me to test it yet, except to make sure it compiles. But I just want
> >> to see if you think the approach is reasonable before I continue.
> >
> > Please go ahead. I'm really excited that you're working on this. FIFOs
> > are badly in need of a better approch anyway(*). Turn the code upside
> > down, for all it's worth!
>
> Thanks for the encouragement, and Happy Holidays to you too. One question: In
> the new AF_UNIX socket code you mostly used NT functions, but the existing FIFO
> code uses Win32 functions. Do you prefer NT functions for new code?
The NT functions have some advantages over the Win32 functions.
For instance, WaitNamedPipe is not interruptible, while
NtFsControlFile(FSCTL_PIPE_WAIT) can be called asynchronously
and then you can just wait for an event object via cygwait
(see fhandler_socket_unix::wait_pipe_thread).
So, in theory I'd prefer NT functions, but if you feel uncomfortable
and just want to implement away, feel free to go ahead with Win32
functions.
Corinna
--
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-developers/attachments/20181226/88802b4c/attachment.sig>
More information about the Cygwin-developers
mailing list