]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: pipe: Do not call PeekNamedPipe() if it is not necessary.
authorTakashi Yano <takashi.yano@nifty.ne.jp>
Wed, 15 Sep 2021 00:55:57 +0000 (09:55 +0900)
committerCorinna Vinschen <corinna@vinschen.de>
Wed, 15 Sep 2021 09:29:27 +0000 (11:29 +0200)
commit00cbbaa33e7183a6b414cc0f36bc6cbf0b22d8ce
tree9325ec2b87e05bd10435e50594da60f51b596193
parent593a86f9b0262243510b2d9c97868a6b60f89c69
Cygwin: pipe: Do not call PeekNamedPipe() if it is not necessary.

- In pipe_data_available() in select.cc, PeekNamedPipe() call is
  not needed if WriteQuotaAvailable is non-zero because we already
  know the write pipe has a space. Therefore, with this patch,
  PeekNamedPipe() is called only when WriteQuotaAvailable is zero.
  This makes select() on pipe faster a bit.
winsup/cygwin/select.cc
This page took 0.031094 seconds and 5 git commands to generate.