From owner-freebsd-current@FreeBSD.ORG Sun Nov 6 15:22:53 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6324B106564A; Sun, 6 Nov 2011 15:22:53 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id EB7D28FC15; Sun, 6 Nov 2011 15:22:52 +0000 (UTC) Received: by ggnk3 with SMTP id k3so3806511ggn.13 for ; Sun, 06 Nov 2011 07:22:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=4Vcy9s/WvKzLpmg41Gqq4Yi8G7gEVA4f8NoCKre0/Yc=; b=wITo5NqcSLY7wR7f8Xcw7+dJbrzCcRQHCn2nENYX8p3Qqh6MhEydIONcKjOCD1vNXp T3ileXqmPoP52R6MzveHcbSUZUYtIi2AjkqnE5XJrBxa9AQbljsKfVOM04PJdm1zAHVl 3tcPfqgABCpWQFdDI1khwKvFfqwMLoxOkgwMI= MIME-Version: 1.0 Received: by 10.50.88.199 with SMTP id bi7mr33520999igb.45.1320592971879; Sun, 06 Nov 2011 07:22:51 -0800 (PST) Sender: mdf356@gmail.com Received: by 10.68.49.35 with HTTP; Sun, 6 Nov 2011 07:22:51 -0800 (PST) In-Reply-To: <20111106124331.GP50300@deviant.kiev.zoral.com.ua> References: <4EB2D48E.1030102@rice.edu> <20111104100828.GG50300@deviant.kiev.zoral.com.ua> <4EB40015.5040100@rice.edu> <20111104153004.GK50300@deviant.kiev.zoral.com.ua> <4EB4095D.3030303@rice.edu> <20111104160339.GM50300@deviant.kiev.zoral.com.ua> <20111105141306.GW50300@deviant.kiev.zoral.com.ua> <20111105151530.GX50300@deviant.kiev.zoral.com.ua> <4EB595FA.4020500@rice.edu> <20111106124331.GP50300@deviant.kiev.zoral.com.ua> Date: Sun, 6 Nov 2011 07:22:51 -0800 X-Google-Sender-Auth: DtaeaDnQlAnu4G85AyWcnFCnl8I Message-ID: From: mdf@FreeBSD.org To: Kostik Belousov Content-Type: text/plain; charset=ISO-8859-1 Cc: "K. Macy" , Alan Cox , Andriy Gapon , freebsd-current@freebsd.org, Benjamin Kaduk , Penta Upa Subject: Re: vm_page_t related KBI [Was: Re: panic at vm_page_wire with FreeBSD 9.0 Beta 3] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Nov 2011 15:22:53 -0000 On Sun, Nov 6, 2011 at 4:43 AM, Kostik Belousov wrote: > Regarding the _vm_page_lock() vs. vm_page_lock_func(), the mutex.h has > a lot of violations in regard of the namespaces, IMO. The __* namespace > is reserved for the language implementation, so our freestanding program > (kernel) ignores the requirements of the C standard with the names like > __mtx_lock_spin(). Using the name _vm_page_lock() is valid, but makes > it not unreasonable for other developers to introduce reserved names. > So I decided to use the suffixes. vm_map.h locking is free of these > violations. I'm pretty sure that when the C standard says, "the implementation", they're referring to the compiler and OS it runs on. Which makes the FreeBSD kernel part of "the implementation", which is precisely why so many headers have defines that start with __ and then, if certain posix defines are set, also uses non-__ versions of the name. Cheers, matthew