Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 13 Feb 2002 02:48:06 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 13 Feb 2002 02:47:57 -0500 Received: from dell-paw-3.cambridge.redhat.com ([195.224.55.237]:57840 "HELO executor.cambridge.redhat.com") by vger.kernel.org with SMTP id ; Wed, 13 Feb 2002 02:47:47 -0500 To: Alan Cox Cc: bwatson@kahuna.cag.cpqcorp.net, marcelo@conectiva.com.br, linux-kernel@vger.kernel.org, dhowells@redhat.com, hch@caldera.de Subject: Re: [PATCH] 2.4.18-pre9, trylock for read/write semaphores In-Reply-To: Message from Alan Cox of "Tue, 12 Feb 2002 23:29:29 GMT." User-Agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.3 Emacs/21.1 (i386-redhat-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII Date: Wed, 13 Feb 2002 07:47:32 +0000 Message-ID: <26100.1013586452@warthog.cambridge.redhat.com> From: David Howells Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org > > + new = old + RWSEM_ACTIVE_READ_BIAS; > > + if (cmpxchg(&sem->count, old, new) == old) > > + return 1; > > cmpxchg isnt present on i386 This isn't actually relevant... isn't actually used unless CONFIG_RWSEM_GENERIC_SPINLOCK is turned off, which it isn't if the CPU type is configured to "i386": [arch/i386/config.in] if [ "$CONFIG_M386" = "y" ]; then define_bool CONFIG_X86_CMPXCHG n define_bool CONFIG_X86_XADD n define_int CONFIG_X86_L1_CACHE_SHIFT 4 define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n else define_bool CONFIG_X86_WP_WORKS_OK y define_bool CONFIG_X86_INVLPG y define_bool CONFIG_X86_CMPXCHG y define_bool CONFIG_X86_XADD y define_bool CONFIG_X86_BSWAP y define_bool CONFIG_X86_POPAD_OK y define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y fi [include/linux/rwsem.h] #ifdef CONFIG_RWSEM_GENERIC_SPINLOCK #include /* use a generic implementation */ #else #include /* use an arch-specific implementation */ #endif David - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/