public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: dsp: Reduce wait time for blocking read().
@ 2023-09-05  9:30 Takashi Yano
  0 siblings, 0 replies; only message in thread
From: Takashi Yano @ 2023-09-05  9:30 UTC (permalink / raw)
  To: cygwin-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=8b2b54b41da605e69a4f30919f24f7a7254d9314

commit 8b2b54b41da605e69a4f30919f24f7a7254d9314
Author: Takashi Yano <takashi.yano@nifty.ne.jp>
Date:   Tue Sep 5 17:11:13 2023 +0900

    Cygwin: dsp: Reduce wait time for blocking read().
    
    Previous wait time of 100msec is too long if application specifies
    smaller buffer. With this patch, the wait time is reduced to 1msec.

Diff:
---
 winsup/cygwin/fhandler/dsp.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/fhandler/dsp.cc b/winsup/cygwin/fhandler/dsp.cc
index e872aa08c..00f2bab69 100644
--- a/winsup/cygwin/fhandler/dsp.cc
+++ b/winsup/cygwin/fhandler/dsp.cc
@@ -931,8 +931,8 @@ fhandler_dev_dsp::Audio_in::waitfordata ()
 	  set_errno (EAGAIN);
 	  return false;
 	}
-      debug_printf ("100ms");
-      switch (cygwait (100))
+      debug_printf ("1ms");
+      switch (cygwait (1))
 	{
 	case WAIT_SIGNALED:
 	  if (!_my_tls.call_signal_handler ())

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-05  9:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-05  9:30 [newlib-cygwin] Cygwin: dsp: Reduce wait time for blocking read() Takashi Yano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).