From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7868) id E3352385781F; Tue, 5 Sep 2023 09:30:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E3352385781F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1693906238; bh=1IUKUTOfFMN5yL3jL7yFoARSL8/3BAaKialcy/YEyOo=; h=From:To:Subject:Date:From; b=fZceV4d47+FHKTbjbbRPRijMqm3eoJF245HHL7fBV86H+YI7TEZMnpB2TVwgLLKih tsVmEZTm02T5XBwwfDQjy8Dype1mmR0GwqEFGh6mv4Wz9PlZbocUwP9AhpN1pJfoMr iU3tnKku1qNJefdIX7zpVG0qEsmIuOfifUgcwgtg= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Takashi Yano To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: dsp: Reduce wait time for blocking read(). X-Act-Checkin: newlib-cygwin X-Git-Author: Takashi Yano X-Git-Refname: refs/heads/master X-Git-Oldrev: 2654a5ba76de97f5211aa033fb1c7223a127e1b9 X-Git-Newrev: 8b2b54b41da605e69a4f30919f24f7a7254d9314 Message-Id: <20230905093038.E3352385781F@sourceware.org> Date: Tue, 5 Sep 2023 09:30:38 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D8b2b54b41da= 605e69a4f30919f24f7a7254d9314 commit 8b2b54b41da605e69a4f30919f24f7a7254d9314 Author: Takashi Yano Date: Tue Sep 5 17:11:13 2023 +0900 Cygwin: dsp: Reduce wait time for blocking read(). =20 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 ())