From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ns2.suse.de ([195.135.220.15]:50210 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751077AbXHHK06 (ORCPT ); Wed, 8 Aug 2007 06:26:58 -0400 From: Andi Kleen Subject: Re: [patch 2/2] x86_64: ticket lock spinlock Date: Wed, 8 Aug 2007 12:26:55 +0200 References: <20070808042234.GE11018@wotan.suse.de> <20070808042444.GF11018@wotan.suse.de> In-Reply-To: <20070808042444.GF11018@wotan.suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708081226.55651.ak@suse.de> Sender: linux-arch-owner@vger.kernel.org To: Nick Piggin Cc: Andrew Morton , Linus Torvalds , Ingo Molnar , linux-arch@vger.kernel.org, Linux Kernel Mailing List List-ID: > * > * (the type definitions are in asm/spinlock_types.h) > */ > > +#if (NR_CPUS > 256) > +#error spinlock supports a maximum of 256 CPUs > +#endif > + > static inline int __raw_spin_is_locked(raw_spinlock_t *lock) > { > - return *(volatile signed int *)(&(lock)->slock) <= 0; > + int tmp = *(volatile signed int *)(&(lock)->slock); Why is slock not volatile signed int in the first place? > - int oldval; > + short tmp; > + short oldval; Broken white space? -Andi