vm_page_t related KBI [Was: Re: panic at vm_page_wire with FreeBSD 9.0 Beta 3]

mdf at FreeBSD.org mdf at FreeBSD.org
Sun Nov 6 15:22:53 UTC 2011

On Sun, Nov 6, 2011 at 4:43 AM, Kostik Belousov <kostikbel at 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.


More information about the freebsd-current mailing list