Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 20 Sep 2002 05:27:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 20 Sep 2002 05:27:40 -0400 Received: from mx1.elte.hu ([157.181.1.137]:46246 "HELO mx1.elte.hu") by vger.kernel.org with SMTP id ; Fri, 20 Sep 2002 05:27:39 -0400 Date: Fri, 20 Sep 2002 11:40:16 +0200 (CEST) From: Ingo Molnar Reply-To: Ingo Molnar To: Oleg Drokin Cc: Linus Torvalds , William Lee Irwin III , Subject: Re: [patch] generic-pidhash-2.5.36-D4, BK-curr In-Reply-To: <20020920122716.A2297@namesys.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 767 Lines: 21 On Fri, 20 Sep 2002, Oleg Drokin wrote: > > + if (cmpxchg(&map->page, NULL, page)) > > + free_page(page); > > Note that this piece breaks compilation for every arch that does not > have cmpxchg implementation. > This is the case with x86 (with CONFIG_X86_CMPXCHG undefined, e.g. i386), > ARM, CRIS, m68k, MIPS, MIPS64, PARISC, s390, SH, sparc32, UML (for x86). we need a cmpxchg() function in the generic library, using a spinlock. Then every architecture can enhance the implementation if it wishes to. Ingo - 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/