X-Recipient: archive-cygwin@delorie.com
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B50C33858D3C
Authentication-Results: sourceware.org;
 dmarc=fail (p=none dis=none) header.from=nifty.ne.jp
Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nifty.ne.jp
DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com 22IDSXEX007611
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp;
 s=dec2015msa; t=1647610114;
 bh=IMWd3pNnJLbef24ASTpZrej/rZYobOpW6motw/wvpsw=;
 h=Date:From:To:Cc:Subject:In-Reply-To:References:From;
 b=gwqqnzBZya1TaMjsAuVTypM79X7kHJntgJstDo2zoPj+oVgh/zIkv2if8nzJbfah/
 7/Sju/hDTwuc+QwhcXyNO3/YxBpvOntS0OSBGJIdMRoGDMD+Px1bxIOV4B5soHbsW0
 rhp6JU7Q/qOE0IHp3StePgs+xwUkCU2ek1SWHZUqjOP85YI4NO9Qj+FtOSAZVKIPKM
 bz7MSg3fV/TdPM6uBIYxaDsOG5SmMYo5s5QrTgPiQYRUyoeACOWEi9JimqlyjApHLz
 +ShBpmPcjgCmoD0m79OZ6ZIUMtfxFB6F1xGeLCyehrUabI7LshhEQDOTG7V0u/lqBN
 r1jVd23GRwDtg==
X-Nifty-SrcIP: [119.150.36.16]
Date: Fri, 18 Mar 2022 22:28:36 +0900
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Subject: Re: Typed characters are mis-ordered when CPU usage is high
Message-Id: <20220318222836.7fdebd15e677d145787daf0b@nifty.ne.jp>
In-Reply-To: <CAGHpTBKiEi_XC8oXhYcS=9hPW=9Gd2Ep=aTdLwbxsBp4zDmqqQ@mail.gmail.com>
References: <CAGHpTBKbqxWQ+WOc=UZH1a155gHhNc4ogVE0sP=rCw7q5xoNpQ@mail.gmail.com>
 <20220302081259.2a7e522ef1a9e3e6da0aa259@nifty.ne.jp>
 <CAGHpTBLc9waVzjKWb84C5KS+s9uKENrOMAxxfBBrvPR-zKKtPQ@mail.gmail.com>
 <20220303090208.4a04e35756b7868fe9b4701d@nifty.ne.jp>
 <CAGHpTBKU5XQJ6mjsvb94LnbJb5xj3uoRMtt3KgsMx1NjpM5hSg@mail.gmail.com>
 <20220312063625.9ca3d42d4e2e941a13fa7909@nifty.ne.jp>
 <CAGHpTBLe0D9gQaK=4A91w5eravsygpWe001DhcB=hhrcLx6YWA@mail.gmail.com>
 <20220318132335.d5635fe9fc782ed53bddf7bc@nifty.ne.jp>
 <20220318142243.1751c742ebaae47e8fba9b47@nifty.ne.jp>
 <CAGHpTBLRzXpg77FjxT6OQPrC+12k1VYd-r-wNryEC0DZiYdQfw@mail.gmail.com>
 <20220318153058.22d217eea1bb746e709da555@nifty.ne.jp>
 <CAGHpTBKMxgUdbucTKzVzthUB4u_F5P=sOrjVnjPz-kd8YLumSA@mail.gmail.com>
 <CAGHpTBLYStvKSOc8JZtCdTcziLam=xzO5eGs+VF0LGXJM8dG3A@mail.gmail.com>
 <20220318211522.936158f91219816ca5c707e7@nifty.ne.jp>
 <CAGHpTBKiEi_XC8oXhYcS=9hPW=9Gd2Ep=aTdLwbxsBp4zDmqqQ@mail.gmail.com>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE,
 SPF_HELO_NONE, SPF_PASS, TXREP,
 T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
Cc: Orgad Shaneh <orgads@gmail.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>

On Fri, 18 Mar 2022 15:04:31 +0200
Orgad Shaneh wrote:
> On Fri, Mar 18, 2022 at 2:15 PM Takashi Yano <takashi.yano@nifty.ne.jp> wrote:
> > Thanks. I can reproduce the issue. I think I found the cause.
> > The two unexpected things happen.
> >
> > (1) wVirtualKeyCode and wVirtualScanCode of readback key event may
> >     be null'ed even if they are not zero on WriteConsoleInputW().
> >     Therefore, memcmp() report the event is not equal.
> > (2) WriteConsoleInputW() may not be atomic. The event sequence which
> >     is written by WriteConsoleInputW() may be inserted by key input
> >     in the middle of the sequence.
> >
> > A patch for these issues is attached. Could you please test?
> 
> Awesome, looks good now. Thank you very much!
> 
> Hope this is the last bit :)

Thanks for testing!

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
