From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH 3/4] VMX: Add posted interrupt supporting Date: Tue, 09 Apr 2013 09:59:09 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Zhang, Yang Z" , Jan Beulich Cc: "Zhang, Xiantao" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On 09/04/2013 09:40, "Zhang, Yang Z" wrote: >>> + if ( !pi_test_and_set_on(&v->arch.hvm_vmx.pi_desc) ) >> >> And if it's just because you don't want to have a simple "set" only >> operation, then the two instances should be folded, and the result >> stored in a local variable. > Yes. Only want to set on bit. Perhaps it is better to define a separate > function pi_set_on() for this to make the logic more clear. Yes! -- Keir