From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by sourceware.org (Postfix) with ESMTPS id D3B753858415 for ; Wed, 6 Oct 2021 13:49:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D3B753858415 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 021505C0623; Wed, 6 Oct 2021 09:49:23 -0400 (EDT) Received: from imap45 ([10.202.2.95]) by compute1.internal (MEProxy); Wed, 06 Oct 2021 09:49:23 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudeliedgieejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedfkggr tghkucghvghinhgsvghrghdfuceoiigrtghksehofihlfhholhhiohdrohhrgheqnecugg ftrfgrthhtvghrnhepffetffekheefveehudelkeehuefgkeejtdfgjedvfeeuueejgefh ueeiieejkeefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepiigrtghksehofihlfhholhhiohdrohhrgh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id A79F924A0067; Wed, 6 Oct 2021 09:49:22 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-1331-g5ae342296a-fm-20211005.001-g5ae34229 Mime-Version: 1.0 Message-Id: <47b13460-27a4-474c-879b-ed1c668e5923@www.fastmail.com> In-Reply-To: <20211006115022.GH174703@worktop.programming.kicks-ass.net> References: <20210923171111.300673-1-andrealmeid@collabora.com> <20210923171111.300673-17-andrealmeid@collabora.com> <20211006115022.GH174703@worktop.programming.kicks-ass.net> Date: Wed, 06 Oct 2021 09:48:43 -0400 From: "Zack Weinberg" To: libc-alpha@sourceware.org Cc: "Peter Zijlstra" Subject: Re: [PATCH v2 16/22] futex: Implement sys_futex_waitv() Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Oct 2021 13:49:29 -0000 On Wed, Oct 6, 2021, at 7:50 AM, Peter Zijlstra wrote: > On Thu, Sep 23, 2021 at 02:11:05PM -0300, Andr=C3=A9 Almeida wrote: >> Returns the array index of one of the awakened futexes. There=E2=80=99= s no given >> information of how many were awakened, or any particular attribute of= it >> (if it=E2=80=99s the first awakened, if it is of the smaller index...= ). > > As per some native speakers on IRC, awaken isn't the right word. I've > changed it like the below. "woken" and "awoken" are also not the right word (my brain flags both as= spelling errors). Suggestions below: > - * Returns the array index of one of the awaken futexes. There's no g= iven > - * information of how many were awakened, or any particular attribute= of it (if > - * it's the first awakened, if it is of the smaller index...). > + * Returns the array index of one of the woken futexes. There's no gi= ven > + * information of how many were woken, or any particular attribute of= it (if > + * it's the first woken, if it is of the smaller index...). "awakened" was the correct word in all three places here. The sentences= are awkward, I might suggest # Returns the array index of one of the awakened futexes. # No further information is provided: any number of other # futexes may also have been awakened by the same event, and # if more than one futex was awakened, the returned index may # refer to any one of them. (It is not necessarily the futex # with the smallest index, nor the one most recently awakened, # nor ...) > - * @awaken: Index of the last awoken futex, if any. Used to notify the > + * @woken: Index of the last woken futex, if any. Used to notify the > * caller that it can return this index to userspace (return paramet= er) 'awakened' in both places here; also suggest changing 'last' to 'most re= cently' > - * - 1 - One of the futexes was awaken by another thread > + * - 1 - One of the futexes was woken by another thread 'awakened' again (you *could* say 'was woke' here but it sounds slangy). > -static int futex_wait_multiple_setup(struct futex_vector *vs, int cou= nt, int *awaken) > +static int futex_wait_multiple_setup(struct futex_vector *vs, int cou= nt, int *woken) and again > - * absorb any awake events, which cannot be done before the > + * loose any wake events, which cannot be done before the 'wake events' is correct here, but you introduced an unrelated error: 'l= oose' is the opposite of 'tight', you want 'lose' with only one O. > - * was awaken, we don't return error and return this index to > + * was woken, we don't return error and return this index to > * userspace > */ > - *awaken =3D unqueue_multiple(vs, i); > - if (*awaken >=3D 0) > + *woken =3D unqueue_multiple(vs, i); > + if (*woken >=3D 0) 'awakened' in all locations > - * been awaken. > + * been woken. same here > - /* A futex was awaken during setup */ > + /* A futex was woken during setup */ and here zw