From: Ian Campbell Subject: Re: [PATCH] mini-os: fix bit ops comments and memory clobbers. Date: Wed, 18 Jun 2014 15:58:06 +0100 Message-ID: <1403103486.6568.76.camel@kazak.uk.xensource.com> References: <20140618082920.GC5894@type.bordeaux.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WxHJh-0005ds-5O for xen-devel@lists.xenproject.org; Wed, 18 Jun 2014 14:58:25 +0000 In-Reply-To: <20140618082920.GC5894@type.bordeaux.inria.fr> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Samuel Thibault Cc: xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Wed, 2014-06-18 at 10:29 +0200, Samuel Thibault wrote: > This fixes comments about test_and_clear_bit, set_bit and clear_bit, > which are actually not atomic, can be reordered and are not memory > barriers. > > This also drops the empty LOCK and LOCK_PREFIX macros which bring to the > confusion. It took me a little while to work out that the reason these aren't needed is that you have synch_set_bit for the cases where the lock is actually needed. > This also adds missing memory clobbers to set_bit and clear_bit. > > Signed-off-by: Samuel Thibault Acked-by: Ian Campbell