From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCHv4 4/8] arm: provide add_sized() Date: Tue, 5 May 2015 14:49:15 +0100 Message-ID: <1430833755.2660.98.camel@citrix.com> References: <1430408002-30666-1-git-send-email-david.vrabel@citrix.com> <1430408002-30666-5-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YpdEU-0007dD-86 for xen-devel@lists.xenproject.org; Tue, 05 May 2015 13:49:58 +0000 In-Reply-To: <1430408002-30666-5-git-send-email-david.vrabel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: Keir Fraser , Tim Deegan , Jennifer Herbert , Jan Beulich , Andrew Cooper , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Thu, 2015-04-30 at 16:33 +0100, David Vrabel wrote: > add_sized(ptr, inc) adds inc to the value at ptr using only the correct > size of loads and stores for the type of *ptr. The add is /not/ atomic. atomic.h is an odd place for it then ;-) But given you use the infrastructure I can't suggest a better home. > This is needed for ticket locks to ensure the increment of the head ticket > does not affect the tail ticket. > > Signed-off-by: David Vrabel Acked-by: Ian Campbell