From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E57833858C39; Tue, 20 Sep 2022 15:55:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E57833858C39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663689304; bh=/+GmcWQePax0pGO2CEQOl2grex/4u1vvdrHfOVYasJE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FoSMOEJ+zaYBG7pd2MJPNjy22S++ppW27o7YQ3CxxMMT90UGEvMxoLFdO33xyXQW4 FVJ2Qkw9gQpRqhXVfAbkWlNxb21WEpM9vs6UEmiEYG2ACiUAbdhsJVjGewA8PkRxcH xxwCeZRhJjsVL3fT5fjjs72QDs7nzsmtMB02Aq34= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/106772] atomic::wait shouldn't touch waiter pool if used platform wait Date: Tue, 20 Sep 2022 15:55:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106772 --- Comment #14 from Jonathan Wakely --- (In reply to Mkkt Bkkt from comment #12) > First of, I was a toxic, sorry. > But you start this first, maybe it's allowed for maintainer, I don't know. No, you started it with sarcasm and disparaging remarks in comment 4, and continued the aggression in comment 5. Your example demonstrates a state machine where the only possible values of= the atomic are known (e.g. a locked state and unlocked state). That is not the = only way to use atomics. If you have an atomic counter and want to signal when it has been incremented, you cannot tell from the previous value whether anoth= er thread is waiting.=