Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Nov 2011 07:22:51 -0800
From:      mdf@FreeBSD.org
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        "K. Macy" <kmacy@freebsd.org>, Alan Cox <alc@rice.edu>, Andriy Gapon <avg@freebsd.org>, freebsd-current@freebsd.org, Benjamin Kaduk <kaduk@mit.edu>, Penta Upa <bsdboot@gmail.com>
Subject:   Re: vm_page_t related KBI [Was: Re: panic at vm_page_wire with FreeBSD 9.0 Beta 3]
Message-ID:  <CAMBSHm-Egy53818aKTpiPBA22RxqTAyQv0q8PsFUnPPDjt1cBQ@mail.gmail.com>
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> <CAMBSHm86TaJnRRgmPA_t7tiPfQsPyoTqz3ymdHSY1H3t5G864Q@mail.gmail.com> <20111105151530.GX50300@deviant.kiev.zoral.com.ua> <4EB595FA.4020500@rice.edu> <20111106124331.GP50300@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Nov 6, 2011 at 4:43 AM, Kostik Belousov <kostikbel@gmail.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMBSHm-Egy53818aKTpiPBA22RxqTAyQv0q8PsFUnPPDjt1cBQ>