From: Peter Zijlstra Subject: Re: [PATCH v11 02/19] thread_info: Add update_thread_flag() helpers Date: Thu, 24 May 2018 19:02:09 +0200 Message-ID: <20180524170209.GK12198@hirez.programming.kicks-ass.net> References: <1527181008-13549-1-git-send-email-Dave.Martin@arm.com> <1527181008-13549-3-git-send-email-Dave.Martin@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id AF3CB401CD for ; Thu, 24 May 2018 12:55:22 -0400 (EDT) Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2QkwV7GXuDB9 for ; Thu, 24 May 2018 12:54:58 -0400 (EDT) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id DEB454A101 for ; Thu, 24 May 2018 12:51:34 -0400 (EDT) Content-Disposition: inline In-Reply-To: <1527181008-13549-3-git-send-email-Dave.Martin@arm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu To: Dave Martin Cc: Christoffer Dall , Ard Biesheuvel , Marc Zyngier , Catalin Marinas , Will Deacon , Oleg Nesterov , Ingo Molnar , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org List-Id: kvmarm@lists.cs.columbia.edu On Thu, May 24, 2018 at 05:56:31PM +0100, Dave Martin wrote: > There are a number of bits of code sprinkled around the kernel to > set a thread flag if a certain condition is true, and clear it > otherwise. > = > To help make those call sites terser and less cumbersome, this > patch adds a new family of thread flag manipulators > = > update*_thread_flag([...,] flag, cond) > = > which do the equivalent of: > = > if (cond) > set*_thread_flag([...,] flag); > else > clear*_thread_flag([...,] flag); > = > Signed-off-by: Dave Martin > Reviewed-by: Alex Benn=E9e > Acked-by: Steven Rostedt (VMware) > Acked-by: Marc Zyngier > Acked-by: Catalin Marinas > Cc: Ingo Molnar Acked-by: Peter Zijlstra (Intel)